jQuery .change not working in WooCommerce

I am trying to do something very simple. If you go to http://cutecuttingboards.com/product/apple/, I simply want to hide the “From:” price after the user choose a size in the drop down menu. I am trying the code below, which is working fine in Fiddle but not on the live site:

jQuery('#size').on('change', function(){
    jQuery('p.price').hide();
    }); 

Here is the fiddle with unformatted code: http://jsfiddle.net/anneber/U2Mat/

Read More

Any help is much appreciated!
Anne

Related posts

Leave a Reply

3 comments

  1. i know it’s kind of late but.. in case someone else is having the same problem, this should do the trick:

    jQuery(document).ready(function($) {
        $(document).on("change", ".variations #size", function() {
            $('p.price').hide();
        });
    });
    
  2. If I copy/paste your code above into web inspector and then change the selection it works, so most likely, the code is either not in the page, not being run, or being run before the related elements have been loaded into the DOM.

  3. There is an error in your cutecutb.js file the Unterminated comment. i.e you are not terminating the comment

    enter image description here

    There is no “*/” sign.

    EDIT :

    Now another reason in add-to-cart-variation.min.js there is already an onchange event of dropdown

    enter image description here

    You can see you “#size” element is inside “.variations” class

    enter image description here