1jQuery(document).ready(function($) { 2 jQuery(document).on('click', '.u-product .u-btn.u-product-control', function(e) { 3 e.preventDefault(); 4 jQuery(this).parents('.u-product').find('.single_add_to_cart_button').click(); 5 }); 6 function changePrice() { 7 if (jQuery('.woocommerce-variation-price').length) { 8 var priceControl = jQuery('.u-product-price:visible'); 9 if (priceControl.length > 1) { 10 priceControl.each(function(index) { 11 if (index === 0) { return; } 12 priceControl[index].remove(); 13 }); 14 } 15 priceControl.find('.u-price').html(jQuery('.woocommerce-variation-price .price ins').not(':visible').html()); 16 priceControl.find('.u-old-price').html(jQuery('.woocommerce-variation-price .price del').not(':visible').html()); 17 } 18 }; 19 jQuery(document).on('change', '.u-product-variant select', changePrice); 20 function changeQuantity() { 21 if (jQuery('.quantity').length) { 22 jQuery('form .quantity input.qty').val(jQuery('.u-quantity-input .u-input').val()); 23 } 24 }; 25 jQuery(document).on('change', '.u-quantity-input', changeQuantity); 26});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.