javascript - How to remove Conflict in a jQuery plugin in a wordpress website? -
thanks in advance , support. have tried every thing i'm bit stumped this:
i working on wordpress website. have few filters of jquery in , working fine (i initiate these plugins using):
jquery(document).ready(function($){ /*code here*/ });
i using jquery plugin "filter.js" having conflicting issues. when not initiate plugin (only on linking plugin file page) shows jquery conflict , can see in console:
uncaught typeerror: cannot read property 'fn' of undefined
you can find plugin source here.
try wrapping code this:
(function($){ $(document).ready(function(){ //document ready code here }); })(jquery);
wrap filter.js plugin same wrapper, ie:
(function($){ //filter.js code here })(jquery);
if that's not working - make sure jquery included on page.
Comments
Post a Comment