A partial load works like this: add a selector after the url in a load() method call and jQuery will load all matching elements into your specified element.
// load all td elements from the specified url into myElement
$('#myElement').load('http://url/template.html td');
This is shorthand for the following:
$.get(''http://url/template.html', function (html) {
$(html).find('td').each(function (){
$('#myElement').append(this);
});
}
The documentation can be seen here.
Great fix on the query. Thanks for this, cheers!
ReplyDelete