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.
views:
38answers:
1
+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
2010-03-28 23:23:20
You can also just use `jQuery(function($) { ... });`, or `(function($) { ... })(jQuery)` if you don't need to wait for the DOM to be ready.
eyelidlessness
2010-03-28 23:32:24
I also create plugin that use jquery,but a lot of themes use mootools,so I have problem with js conflicts.Tnx for replay
2010-03-30 18:42:00