Streaming live at 10am (PST)

Implementing Jquery Issue

Hello,

I’m running into an issue that may be quite trivial but I cannot figure out how to fix it. I know that when you embed a script with Jquery, it should “go after the Body tag.” Currently I’m getting an error everytime with the “Uncaught ReferenceError: $ is not defined” message.

However, I am not sure what I need to do to place the embed object after the Body in my navigator. My current workaround is to add jquery to the custom code section of my dashboard, but I only want to run this script on product pages. Currently I have an “if” statement that checks for the product class before executing code, which works… but I would rather just be able to add it after the body tag.

Thanks for your help!


Here is my site Read-Only: https://preview.webflow.com/preview/bad-seed-book?utm_medium=preview_link&utm_source=designer&utm_content=bad-seed-book&preview=0a88f70e5a8ef024ccaf01961dd7e617&pageId=5ebae3841010146a1840c3a5&itemId=5f2989c0393b6265424eba9d&mode=preview

Ok, figured out where to put it. You have to go to the pages tab (on the left, right under the current tab) scroll to the page/template you want the script to run on, and when you hover over it you should see a settings icon appear. Click this, and tada you can add custom code to that specific page in the .

I kept reading people say “just go to settings” … but there are like a hundred different “settings” in this platform!! and several different places to add custom code. I hope this helps someone struggling with a similar search.

1 Like

Glad to hear you were able to get it figured out, sometime’s it can get tricky knowing where to place your custom code.

For reference, there are three main areas places extra code can be used—in the project settings (when you want the code to run site-wide), in the page settings (when you want the code to run on a specific page), or within an embed element (which is like the page option, but it allows for certain code, like styles, to render in the Designer).

1 Like