jQuery ajax.load div, then have parent container access property
So I have a tabbed ui "form", each tab is quiet complicated so it is loaded via the .load('item.html'); command.
All good, when the user clicks to a different tab, I want to read a property, maybe execute a function from开发者_如何学JAVA within the ajax loaded div.
What is the best way to get to these properties and methods from outsite the ajax loaded div?
The load function provides a third parameter representing a callback which will be executed when the ajax call completes. You could use it to execute some arbitrary function:
$('#id').load('item.html', { }, function() {
alert('tab loaded');
});
精彩评论