Ledger Nano X - The secure hardware wallet
SHARE
TWEET

Untitled

a guest Jan 9th, 2013 38 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (function($) {
  2. $(document).ready(function(){
  3.  
  4.   $('.field-name-field-add-to-cart').append('<div class="size-selector"><div class="s size">S</div><div class="m size">M</div><div class="l size">L</div><div class="xl size">XL</div><div class="xxl size">XXL</div></div>');
  5.  
  6.   $('#edit-attributes-field-size option').each(function(){
  7.     Elemclass = '.field-name-field-add-to-cart' + ' ' + '.' + $(this).val().toLowerCase();
  8.     $(Elemclass).addClass('available');
  9.   });
  10.  
  11.   $('.size-selector .size').click(function(){
  12.     clicked = $(this);
  13.     selectedSize = $(clicked).text().toUpperCase();
  14.     if($(this).hasClass('available')) {
  15.       $('.size-selector .size').each(function(){
  16.         $(this).removeClass('selected');
  17.       });
  18.  
  19.       $(this).addClass('selected');
  20.       $('.form-select').find('option:contains("' + selectedSize +'")').change()
  21.     }
  22.   });  
  23. });
  24. })(jQuery);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top