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.
精彩评论