tags:

views:

38

answers:

1

I have wordpress theme that use mootools and jQuery. I use jQuery noconflict to avoid conflicts of js libraries; this didn't help me.
Can someone help me with right order of including js libraries on my wordpress theme.
Thanks in advance.

+1  A: 

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.
Soufiane Hassou
You can also just use `jQuery(function($) { ... });`, or `(function($) { ... })(jQuery)` if you don't need to wait for the DOM to be ready.
eyelidlessness
I also create plugin that use jquery,but a lot of themes use mootools,so I have problem with js conflicts.Tnx for replay