You will see from this code that it loads the content URL from the hash tag. Is there anyway to load only a single div element from that external page.
$(function() {
if(location.hash) $("#content_inload").load(location.hash.substring(1));
$("#nav a").click(function() {
$("#content_inload").load(this.hash.substring(1));
});
});
so something like after .substring(#inload_content(1))
but that does not work.
Thanks
Yes, see "Loading Page Fragments" on http://api.jquery.com/load/.
In short, you add the selector after the URL. For example:
$('#result').load('ajax/test.html #container');
Source: Stackoverflow.com