Jquery and mootools are nice tools and Joomla! developers often like to use both. The drawback is that mootools must be loaded before jquery in order to make sure there won't be conflicts. So far not a big deal, but without forcing mootools to be loaded first there is a good chance that your jquery code will conflict in certain situations.
To prevent that, just put this line at the top of your component entry point file (compname.php):
JHTML::_('behavior.mootools'); // this will make sure mootools loads first
Now in your jQuery app, return the jquery handle:
var jq = jQuery.noConflict(); // and use jq instead of $
or just
jQuery.noConflict(); // keep using $
Hope that helps and works for anyone out there looking for a simple and clear solution.
You need to be a member of All Together, As A Whole to add comments!
Join All Together, As A Whole