$ is not defined on Debut

Highlighted
New Member
1 0 0

Hey,

 

So I'm creating a theme based on Debut and for a while now I'm having this error on my console telling me $ is not defined. The error comes from theme.js and I'm having a hard time figuring out what's the problem. I need to add some new JS to my theme and I'm assuming theme.js is the way to go (unless it isn't), anyways. I'm developing on my "local" server using Slate. The bar at the bottom is also now working, so I guess it is because of theme.js having this error.

 

EOOiIpcVle6gJ6

 

EDIT: This is the code from the line when the error happens

4HDiMmS

 

Hope someone can help me and sorry if this is not the right forum!

0 Likes
Shopify Partner
1778 293 382

Hi,

$ is Undefined error only occur when Jquery file not load.

So please check your coded added in theme.js is in init function.

This issue occur because your code load first and jquery library load after that.

 

Want to modify or custom changes on store hire me.
If helpful then please Like and Accept Solution.
Email: jasoliyabrijesh123@gmail.com
Skype: jasoliya.brijesh
0 Likes