Is it possible to use mootools and jQuery both together

jquery, jquery-ui

Solution

Yes, you'll have to include this code just after you include your jQuery and before you include Mootools.

<script>
    var j$ = jQuery.noConflict();
</script>

You'll then want to find/replace all jQuery `$` references with `j$`, preferably using the automated tool found in most code editors.

You also have another option, a closure. It would look something like this, if I remember correctly:

(function($) {
  //jQuery stuff
})(jQuery);

You'll want to move all your existing code inside this function. It scopes the `$` variable so you can do business with jQuery as usual within the closure, then use Mootools outside of it.

Problem

I have to use mootools and jquery files together. But there is a conflict occurs while using both together. Is there any solution to avoid this conflict?

Original source