I have used the line below in my app. But now I need to parse the html loaded before I show it. Whats the best way to get certain html elements.
$(\"#div\").
You can use the semi-equivalent expanded version of $.get(), like this:
$.get("page.html", function(data) {
var data = $(data);
//do something
$("#div").html(data);
});
Note that calling .html(data) in this case is just a shortcut for .empty().append(data).
Or, if post-processing is an option, just use the .load() callback, like this:
$("#div").load("page.html", function() {
$(this).find(".class").remove(); //just an example
});