Jump to content

Recommended Posts

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. 

 

 

Link to comment
https://forums.phpfreaks.com/topic/297855-magento-help/
Share on other sites

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. 

Link to comment
https://forums.phpfreaks.com/topic/297855-magento-help/#findComment-1519246
Share on other sites

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.

  • Like 1
Link to comment
https://forums.phpfreaks.com/topic/297855-magento-help/#findComment-1519248
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.