沈志川 (Benx) schrieb:
> Why not use document.createElement("script") !?
> 
> Here is my solution and work well in IE6 and FF2
> 
> // replace the call for eval.call(window, script)
> jQuery.evalJS = function (script) {
>     var js = document.createElement('SCRIPT');
>         js.type = 'text/javascript';
>         js.text = script;
>         document.body.appendChild(js);
> };
> 
> // @override
> jQuery.getScript = function (src, callback) {
>     var js = document.createElement('SCRIPT');
>         js.type = 'text/javascript';
>         js.src = src;
>         js.defer = true;
>         document.body.appendChild(js);
> }

I haven't followed sorrowly, so I don't know if that would be the 
solution to the problem.

I only know that support for adding dynamically created script elements 
has been added in Safari not until version 2.01, so this isn't really an 
option I assume.

http://webkit.org/blog/?p=26

-- 
Klaus

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

Reply via email to