Reputation: 2634
I have a site built on Joomla. Joomla uses mootools, while most extensions use jquery. I have a template I use in Joomla that seems to have an issue with my registration page. If I change my template everything works fine.
I believe it is a jquery conflict guessing from some searches on my yootheme template I use. I'm getting nothing from the template creators.
Firebug doesn't show anything. Any tips on how I can debug any issues here?
Upvotes: 0
Views: 1064
Reputation: 119847
this is a namespacing issue. mootools and jquery (aside from the original jQuery()
) uses the same $()
-named function for it's selectors. using both on the same site, one will conflict the other. however, since mootools is native to Joomla and your jQuery is the "visitor" framework, you can change the namespace of jQuery using the .noConflict() function.
//future uses of jQuery will use "j" instead of "$"
//i think you can still use the original "jQuery()" also
var j = jQuery.noConflict();
//instead of:
$("selector");
//now you use:
j("selector");
//or
jQuery("selector");
declare .noConflict()
just after you loaded your jQuery, but load both of these before Joomla's mootools script. also, whatever jQuery scripts that come in plugins, make sure to change their $()
to the namespace you changed, or jQuery()
Upvotes: 1