I am creating a plugin that generates advanced search queries. All of the UI is done in bootstrap, and the results are displayed via modal (bootstrap.js). On the production site Greenlane SEO I get the JS error: Uncaught TypeError: Object [object Object] has no method 'modal'
. I cannot figure out for the life of me what is causing this as I installed this on another WP site and the plugin works seamlessly (minus the styling).
-
You are loading jQuery 1.8.3 and jQuery 1.9.1. That is a good way to get a conflict.– s_ha_dumCommented Jul 15, 2013 at 13:28
-
Hmm, i'll take a look! Thanks for the quick response.– Zach RussellCommented Jul 15, 2013 at 13:32
-
Yea, this is the problem with dime-a-dozen themeforest themes. I am not seeing jquery 1.9.1 in the source though. I'm referring to the Greenlane SEO site which is throwing the errors.– Zach RussellCommented Jul 15, 2013 at 13:45
-
Yea, I see it now. I commented out the theme's version of jQuery, now more errors are getting thrown, including jQuery not defined, though it's clearly there.– Zach RussellCommented Jul 15, 2013 at 13:59
-
Okay, I fixed it! Seems I had to queue jQuery again. Works! Thank you.– Zach RussellCommented Jul 15, 2013 at 14:03
Add a comment
|
1 Answer
You are loading jQuery 1.8.3 and jQuery 1.9.1. 1.8.3 loads from wp-includes
. 1.9.1 loads from Google. Install JSView on FireFox and right click the page. You will see them. There are two Javascript files, both named jquery.js
.
You need to work out what is loading those two scripts and make sure that only one jQuery gets loaded, and it will have to be the right one. Hopefully that is the most recent one-- 1.9.1