开发者

jQuery inserted into pages

I insert a line into the header of a page such as facebook

<script type="text/javascript" src="http://websitename.com/jquery.js"></script>

Now that page has jquery, the issue is that now that page is now messed up. Messed up in the sense that animations and events dont fire off for menus and such. The facebook account button on the top right no longer expands. How can I include jquery onto a page without breaking that page's own jquery/plugins/javascript?

noConflict does not work, the issue is simply including jquery on the page. Not using it.

I made a firefox addon that requires jquery to be on the page. So i开发者_运维问答t inserts it and works well, but breaks certain websites by simply including it.


Have a look at .noConflict()


Well the facebook site probably has a different definition for the $ variable which you overwrote when you added jQuery.


You may take a look at the following article about using jQuery with other libraries.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜