Jonathan Sharp schrieb: > 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'); You could pass the changed element as additional arguments to the event, so you just update those, something like this:
// jquery.myPlugin.js $(window).bind('myPluginReload', function(event, changedElement) { $("find stuff", changedElement).myPlugin({do: "things"}); }); // Content being returned via AJAX $(window).trigger('myPluginReload', changedElement); -- Jörn Zaefferer http://bassistance.de _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/