[jQuery] Execute scripts in newly-injected HTML?
Currently, I'm trying to figure out how execute javascript (mostly jquery functions) from script tags that reside in newly-inject HTML rendered from an ajax call.�� I'm aware of the ability to execute scripts in the callback function of $.load, but would prefer to put specific javascript inline in the injected html because each injected page has many functions.�� In looking to see how to do this, I found the code below in the AJAX plugin section of the Jquery base.���� Has anyone had luck get this code to work for my situation, or have a plugin that accomplishes what I'm trying to do?���� Is there something else I'm missing, maybe a bug?<br /> <br /> // Execute all the scripts inside of the newly-injected HTML<br /> $("script", self).each(function(){<br /> eval( this.text || this.textContent || this.innerHTML || "");<br /> });<br /><hr><font size=2 face=geneva><b>Join Excite! - <a href=http://www.excite.com
target=_blank>http://www.excite.com</a></b>
The most personalized portal on the Web!</font>
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/