piearcy Posted August 19, 2015 Share Posted August 19, 2015 Summary, I have a Magento site which was loading about 7 different varieties of jQuery. We want to cut them down to a single library. These ranged from 1.10.1 to 2.1.4. So we have chosen to use 2.1.4 and then fix the errors that come up. This being said, I'm down to a few but now am getting the errors that need correcting. I'm not at ALL a jQuery expert but choose to write in native javascript whenever possible as I'm not a fan of libraries if it can be done natively saving kb's. But this does not help me now as I'm having the afore mentioned errors and not being a jQuery expert I'm not certain what I need to do next. www.dev.michaeltoddusa.com. This is the shortest way for you to look at the source code and let me know where I need to start. Any help is appreciated. Quote Link to comment https://forums.phpfreaks.com/topic/297855-magento-help/ Share on other sites More sharing options...
scootstah Posted August 19, 2015 Share Posted August 19, 2015 We're not going to search through your site to discover which parts of it are causing errors. That is your job. Post the errors that you are getting, with relevant code snippets, and then we can help. Quote Link to comment https://forums.phpfreaks.com/topic/297855-magento-help/#findComment-1519243 Share on other sites More sharing options...
piearcy Posted August 19, 2015 Author Share Posted August 19, 2015 We're not going to search through your site to discover which parts of it are causing errors. That is your job. Post the errors that you are getting, with relevant code snippets, and then we can help. Absolutely understand. I'm getting 4 errors after removing 1.11.2. All saying different things are not a function. Of of which is $elem. I've read the use of $ is no good with Magento and also read to wrap it as such, $($elem) but his had no effect. Nor does using jquery instead of $. a(document).on is also not a function in bootstrap.js. Then some individual things like owl slider is not found. Quote Link to comment https://forums.phpfreaks.com/topic/297855-magento-help/#findComment-1519246 Share on other sites More sharing options...
scootstah Posted August 19, 2015 Share Posted August 19, 2015 There's nothing in jQuery called $elem, so that is probably a user-created variable, which is expected to be a jQuery object. Sounds like whatever is passing that value has broken; perhaps a selector or something. If these are external dependencies breaking (like Bootstrap), you're going to want to make sure that they are the latest version, and that they even support jQuery 2.x. Make sure that jQuery is being loaded before anything else. 1 Quote Link to comment https://forums.phpfreaks.com/topic/297855-magento-help/#findComment-1519248 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.