?
avatar Serhioromano
Serhioromano
27 Sep 2012

We were using mootools very heavily. We had even own library to be installed with a lot of mootools libraries. Now we are adopting our extensions to Joomla 3.0. We were planning to change all inline (code in layouts) and our own js files to jQuery. And continue use mootools libraries. That should not be rea;y a problem. The solution is simple.

http://davidwalsh.name/jquery-mootools

Just to load jQuery before mootools because only jQuery has no conflict mode. But it is completely oposite. Te jQuery is loaded last. Even after I call my scripts. Just like it was not intended to be used.

I think that no matter what jQuery have to be first, then no conflict statement or file, then bootstrap.js and then the rest.

Right now I have managed to call $document->addScript('media/jui/js/jquery.js') before I call my scripts. But I am not sure if it is clear implementation and if it will going affect some other extension modules that are still using mootools.

The problem is that even if we add no conflict after jquery as it is loaded after mootools it already overrides $.

avatar Serhioromano Serhioromano - open - 27 Sep 2012
avatar joeguo
joeguo - comment - 6 Dec 2012

Why not just use jquery?

avatar realityking
realityking - comment - 6 Dec 2012

I suggest to change your code to use the dollar safe mode. Basically you always use document.id() instead of $(). This way jQuery can do whatever it wants and MooTools won't care. The core is already ready for this and doesn't use $() anymore.

avatar zero-24 zero-24 - close - 28 Dec 2012
avatar mbabker mbabker - close - 28 Dec 2012
avatar zero-24 zero-24 - change - 7 Jul 2015
Labels Added: ?
Build staging

Add a Comment

Login with GitHub to post a comment