开发者

How do I use two different versions of jQuery side by side?

开发者 https://www.devze.com 2023-03-05 04:09 出处:网络
I\'m writing a wrapper for Yahoo Web Analytics at work. My wrapper has jQuery 1.5.3 built-in, while the page where I\'m installing the wrapper uses jQuery 1.4.3. When I include my wrapper, their site

I'm writing a wrapper for Yahoo Web Analytics at work. My wrapper has jQuery 1.5.3 built-in, while the page where I'm installing the wrapper uses jQuery 1.4.3. When I include my wrapper, their site fails, due to what I'm guessing is the updated Ajax functions in jQuery 1.5.3.

Is there any way I can include jQuery without overwriting the previously included 开发者_高级运维jQuery scripts?


Them upgrading their page is unfortunately not an option. Neither is downgrading our tracking script.


var $yournamespece = jQuery.noConflict(true);
// now use $yournamespace instead of $
$yournamespace('selector')

Though I'm curious as to what your script uses that is not compatible with their version...1.5 hasn't really been out all that long

0

精彩评论

暂无评论...
验证码 换一张
取 消