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 $.
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.
Labels |
Added:
?
|
||
Build | ⇒ | staging |
Why not just use jquery?