I am having a conflict between the plugin and my WP theme itself. Once the plugin is activated, everything js related stops working: animation on dropdowns, main slider, widget slider, countdown and a few other things.
I looked at the theme’s custom JavaScript file that’s named themeblossom.js and while some of the scripts in there correctly use jQuery no-conflict wrappers, some of them do not, and that’s likely why you are seeing so many conflicts.
These can be fixed, and since some of them are actually correctly written, not all of them need to be fixed. For example, if you look at line #2, it correctly is written to not conflict:
jQuery(document).ready(function($) {
Because they pass the $ into the function, everything inside can use the $ without creating a conflict.
The main script that follows (which starts on line 117) has this:
$(document).ready(function($) {
That should be changed to:
jQuery(document).ready(function($) {
The same is the case for the scripts that start on lines 130, 135, 181, 305, 375, and 403.
There is one more script that’s for the dropdown that doesn’t use a document ready function (starts on line 273), so it can be fixed by changing the $ shorthand instances inside the function to be jQuery like this:
Viewing 1 reply thread
The support post ‘JS conflict between the plugin and the WP theme’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.