[jQuery] Evaluating script elements

2006-10-03 Thread Mark Gibson
Hi, I believe there is a flaw in the way scripts are evaluated in the 'load' function. This piece of code is my concern: // Execute all the scripts inside of the newly-injected HTML $(script, self).each(function(){ if ( this.src ) $.getScript( this.src );

Re: [jQuery] Evaluating script elements

2006-10-03 Thread Franck Marcia
2006/10/3, Mark Gibson [EMAIL PROTECTED]: The solution is to wait for each script to load before executing the next. Here's my solution as a plugin: It reminds me of a post I made: http://jquery.com/discuss/2006-June/005496/. It was not specific to scripts loads but could be tweaked to work

Re: [jQuery] Evaluating script elements

2006-10-03 Thread Brian
Looks good, but please don't use eval as the function name. It's a Bad Idea to overload reserved/predefined words, even if namespaced. - Brian $.fn.eval = function(callback) { ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/

Re: [jQuery] Evaluating script elements

2006-10-03 Thread Webunity | Gilles van den Hoven
any ideas? maybe evaluate()? ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/

Re: [jQuery] Evaluating script elements

2006-10-03 Thread Mark Gibson
Brian wrote: Looks good, but please don't use eval as the function name. It's a Bad Idea to overload reserved/predefined words, even if namespaced. Oops, sorry. I was going to rename it before submitting the suggestion. How about: evalScript() exec() execScript() any