开发者

jQuery,and other library right order to include?

I have a Wordpress theme that uses MooTools and jQuery. I use jQuery noConflict to avoid conflicts with 开发者_JS百科other JS libraries; this didn't help me.

Can someone help me with the right order of including JS libraries on my Wordpress theme?

Thanks in advance.


What you need to do is add this before your jquery code :

jQuery.noConflict();

and replace all JQuery $ by jQuery. For example :

  jQuery(document).ready(function($) {
    // Code that uses jQuery's $ can follow here.
  });
  // Code that uses other library's $ can follow here.
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜