Best way to handle jquery conflicts caused by 3rd party plugins? #452
-
In a previous discussion, I asked about issues trying to use the Events Calendar plugin. I believe I have figured out that the issue I am having is because jquery is getting loaded twice. Once from the theme's main.js and then again by the plugin. I was wondering if anyone has found a good way to handle 3rd party plugins that load jquery? Ie. Should I write a function to deregister one if a condition exists? Perhaps I detect the template being used and deregister jquery on specific templates? I see that things like the HeroSlider component require that jquery is loaded in the main.js. If I comment it out, the sliders stop working. However, if I comment it out, the calendar works perfectly. Anyone have any recommendations or ideas? Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Currently I don't know the details of the previous discussion, but off the cuff you can try to use only the native wordpress jquery as did here: feat(jQuery): use wp jquery I hope this helps. |
Beta Was this translation helpful? Give feedback.
Currently I don't know the details of the previous discussion, but off the cuff you can try to use only the native wordpress jquery as did here: feat(jQuery): use wp jquery
I hope this helps.