I am in the process of converting my web application into a fully AJAX architecture.
I have my main page, which is initially loaded, and the div container loaded with dynamic content.
I have created several jQuery plugins that I apply to certain elements to extend their functionality. I usually call functions as follows each time the page loads:
$(document).ready(function () {
$(".entity-search-table").EntitySearch();
});
This will find the appropriate div and call the plugin to enable the necessary functions.
In AJAX, I can’t just apply the plugin during page load, as the elements will be added and removed dynamically.
I would like to do something like this:
$(document).ready(function () {
$(".entity-search-table").live("load", function () {
$(this).EntitySearch();
});
});
: , , <div> , , DOM?
, AJAX . , DOM.
!