B
B
Bowen2014-08-09 20:08:38
JavaScript
Bowen, 2014-08-09 20:08:38

How to make jQuery and MooTools work and not interfere with each other?

Hello! I installed a chat on the site (locallhost), displaying messages, etc. written in jQuery.
The site also has the MooTools library.

On the chat page, the console gives an error in the MooTools code (library), namely on the 15th line, and it looks like this:

x++){var z=v[x];if(e(z)=="type"){h.call(z,w,A);}else{z.call(this,w,A);}}var y=this.prototype[w];if(y==null||!y.$protected){this.prototype[w]=A;}if(this[w]==null&&e(A)=="function"){t.call(this,w,function(i){return A.apply(i,o.call(arguments,1));

I don’t know what to do, delete the MooTools library and rewrite most of its code, under jQuery, or rewrite part of the code from Chat. But I don't even understand what's stopping each other.

js chat code, since it's not small.
jQuery.noConflict(); - did not help, still gives an error, so it's in the chat code.
I would be grateful for help and advice.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Pavlov, 2014-08-09
@lexxpavlov

Where are you calling jQuery.noConflict()? try calling after jQuery is loaded but before MooTools is loaded.
If you disable jQuery, then the scripts on MooTools work fine?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question