skip to Main Content

Hide/Show DIV based on option not working – Shopify

JS beginner here so any help is appreciated. I am trying to get show/hide DIV based on JS. I am using the following: HTML <Select id="single-option-selector-product-template-0"> <option value="White">White</option> <option value="Navy">Navy</option> <option value="Heather Ash">Heather Ash</option> <option value="Heather Grey">Heather Grey</option> </Select> <div…

VIEW QUESTION

Woocommerce – Stop a function if page has a class

I have a simple function that appends the shipping details, to billing details in my woocommerce checkout. However I want this function to stop firing once a class has ben added to a div. function billingclick() { $('#billing_first_name').val($('#shipping_first_name').val()); $('#billing_last_name').val($('#shipping_last_name').val()); };…

VIEW QUESTION

Woocommerce – JQuery CheckBoxes Price addition and deletion

$(document).ready(function(){ $("input[type='checkbox']").click(function(){ var priceTotal = 0; $("#calculator input[type='checkbox']:checked").each(function() { priceTotal += parseInt(this.value, 10); }); $('#total').html(priceTotal); }); }); <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <div id="calculator"> <input type="checkbox" />$29<br/> <input type="checkbox" />$39<br/> <input type="checkbox" />$49<br/> <input type="checkbox" />$59<br/> </div> <div class="total"><span>$0</span></div> Task: Based on the…

VIEW QUESTION
Back To Top
Search