开发者

Using Prototype JS on pages that use jQuery

开发者 https://www.devze.com 2023-01-10 04:11 出处:网络
I am revamping a website that now uses jQuery. The process is more than half way done but for the time being I need to setup a demo as soon as possible. For this I will copy existing ASP code as-is an

I am revamping a website that now uses jQuery. The process is more than half way done but for the time being I need to setup a demo as soon as possible. For this I will copy existing ASP code as-is and these particular pages require prototype plugins. Converting all prototype plugins to jQuery is in the todo list. So I am wodering if there is a workaround that I can use in the mean time to have both libraries working on same page. The workaround is temporary, I'll port the plugins to jQuery (or use a jQuery alternate) eventually.

Edit

OK, so I prefer to stick with $ = 开发者_如何学PythonjQuery. My revised question is: does prototype have a no conflict option? I can wrap all prototype plugin code inside wrappers, so wondering if it is possible to do a:

(function(/* what comes here? */) {
    // some code that uses $ and $$
})(/* what comes here? */);


You could read about Using jQuery with Other Libraries.

0

精彩评论

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