Alex Ritter Alex Ritter - 10 months ago 69
jQuery Question

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:

<script type="text/javascript">
$(document).ready(function() {

Does anyone have any experience adding jquery to weebly's e-commerce product pages? Any help would be appreciated.

Answer Source
(function($) {
  $(function() {
    var $btn = $('#wsite-com-product-buy');
    $('.wsite-product-description').first().append('<div id="something-cool"/>');
    $btn.appendTo('#something-cool').css('top', 0);