[jQuery] Re: Load Google Analytics from jQuery

2007-07-12 Thread Skullman
Hey! That was pretty neat! I will try your code and tell you if it works... Thanks a lot polyrhythmic!!! On 6 jul, 21:37, polyrhythmic [EMAIL PROTECTED] wrote: Found what I was looking for... //forget this code: - $(#ga).after('script type=text/javascript_uacct = UA-2158413-2;

[jQuery] Re: Load Google Analytics from jQuery

2007-07-06 Thread polyrhythmic
I'm not sure that appending the script tag as text forces the browser to parse and run the script as you would like. All examples ( http://cain.supersized.org/archives/2-Dynamic-loading-of-external-JavaScript-.js-files.html , http://ajaxpatterns.org/On-Demand_Javascript ,

[jQuery] Re: Load Google Analytics from jQuery

2007-07-06 Thread polyrhythmic
Found what I was looking for... //forget this code: - $(#ga).after('script type=text/javascript_uacct = UA-2158413-2; urchinTracker();/script') //add this code: + var s2 = document.createElement(script); + s2.type = text/javascript; + s2.text = '_uacct = UA-2158413-2; urchinTracker();'; +