Adding custom jquery on a Weebly e-commerce product page

I am trying to style my Weebly e-commerce product pages by adding a few simple lines of jquery code.

So far, any place I try to add the code doesn't work. I've tried:
1. Adding the code directly to the page layout file in both the header, and right before the closing body tag
2. Adding the script as a "Custom HTML" drop in page object

Using method one, I can inspect the page, and I see that the code snippit I added is coming up on the page, but the script will not run. The script I am trying to add is the following: