How to avoid jquery conflict between two modules in joomla?
I have to use mod_lof
articleslideshow
and ccnewsletter
in a joomla site. Now i am suffering from js conflict of these modules. I tried noConflict js
to avoid this but does not work.
$ is not a function
$('gototop').setStyle('opacity','0');
index....sletter (line 109)
$ is not a function
var css=this.select(property,to);retur...parsed[p]=this.css[p].parse(to[p]);}
mootools.js (line 60)
$ is not a function
var css=this.select(property,to);retur...parsed[p]=this.css[p].parse(to[p]);}
mootools.js (line 60)
$ is not a function
var css=this.select(property,to);retur...parsed[p]=this.css[p].parse(to[p]);}
mootools.js (line 60)
$ is not a function
开发者_如何学Go var css=this.select(property,to);retur...parsed[p]=this.css[p].parse(to[p]);}
mootools.js (line 60)
$ is not a function
var css=this.select(property,to);retur...parsed[p]=this.css[p].parse(to[p]);
Please provide me some solution.
I've always just used the SC jquery plugin, it has a setting that nativity enables no conflict mode.
http://extensions.joomla.org/extensions/core-enhancements/scripts/7230?qh=YToxOntpOjA7czo4OiJzY2pxdWVyeSI7fQ%3D%3D
I'm guessing these are plugins. can you check the plugin source. They should have the following convention wrapping them:
(function($){
//plugin code
})(jQuery)
This avoids any conflict my passing the jQuery
object to the plugin as the parameter $
that you see.
If this isn't present then there is a danger of conflict.
If its in your source code, using jQuery
instead of $
should fix the issue.
精彩评论