How can I avoid calling jquery twice

喜欢而已 提交于 2019-11-30 22:52:45

As I can imagine your problem is that some of the other libraries is using the $ keyword markup to instantiate each calls. If I am correct the just try the following and you will be all set to go..

var $jq = jQuery.noConflict();

Then for all of your jquery calls try use your new markup.. the $jq.

For more detailed info check out this page: http://docs.jquery.com/Using_jQuery_with_Other_Libraries

Use the js script reference at the beginning of your page to ensure that all code is loaded properly at start. Moreover it is likely that some error could be populated from loading all scripts.. To check if any errors exist, use some debugging plug in like Firebug.

Have you tried:

window.jQuery || document.write('<script src="js/jquery-1.7.2.min.js"><\/script>')
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!