Here's another thought too...

What about having a plugin export a custom event, then when dynamic content
is loaded that uses that plugin it just triggers that event.

For example:

// jquery.myPlugin.js
$(window).bind('myPluginReload', function() {
   $("find stuff").myPlugin({do: "things"});
});

// Content being returned via AJAX
$(window).trigger('myPluginReload');

-js


On 3/7/07, Chris Domigan <[EMAIL PROTECTED]> wrote:

Another solution that I've found really handy is to have your event code
included with the html.

So, as in my first example, I might have a php class that generates a
datagrid - both the html AND the javascript with event handlers etc. So the
handlers are bound on initial page load, and then rebound on all subsequent
ajax calls (as .load() automatically evaluates scripts in the new content).

Chris

_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to