1"use strict"; 2 3//https://codepen.io/ainalem/pen/RqYZNO 4jQuery(function ($) { 5 6 $('.woocs-style-2-drop-down').on('click', function () { 7 this.classList.add('woocs-style-2-expand'); 8 $(this).css('height', $(this).data('expanded-height')); 9 return true; 10 }); 11 12 $('.woocs-style-2-x').on('click', function () { 13 $(this).parents('.woocs-style-2-drop-down').removeClass('woocs-style-2-expand'); 14 $(this).parents('.woocs-style-2-drop-down').css('height', '32px'); 15 return false; 16 }); 17 18 //*** 19 20 $('.woocs-style-2-row').on('click', function () { 21 22 var l = woocs_remove_link_param('currency', window.location.href); 23 l = l.replace("#", ""); 24 25 if (woocs_special_ajax_mode) { 26 var data = { 27 action: "woocs_set_currency_ajax", 28 currency: jQuery(this).find('.woocs-style-2-link').data('currency') 29 }; 30 31 jQuery.post(woocs_ajaxurl, data, function (value) { 32 //location.reload(); 33 window.location = l; 34 }); 35 } else { 36 if (Object.keys(woocs_array_of_get).length === 0) { 37 window.location = l + '?currency=' + jQuery(this).find('.woocs-style-2-link').data('currency'); 38 } else { 39 woocs_redirect(jQuery(this).find('.woocs-style-2-link').data('currency')); 40 } 41 } 42 }); 43 44 //*** 45 46 document.addEventListener('after_woocs_get_products_price_html', function (e) { 47 var current_currency = e.detail.current_currency; 48 //current_currency='USD'; 49 jQuery.each(jQuery('.woocs-style-2-drop-down'), function (i, d) { 50 jQuery(d).find('.woocs-style-2-name-large').html(jQuery(d).find(`div.woocs-style-2-link[data-currency=${current_currency}]`).html()); 51 jQuery(d).find('.woocs-style-2-name').html(jQuery(d).find(`div.woocs-style-2-link[data-currency=${current_currency}]`).html()); 52 jQuery(d).find('.woocs-style-2-avatar').css('background-image', 'url(' + jQuery(d).find(`div.woocs-style-2-link[data-currency=${current_currency}]`).data('flag') + ')'); 53 jQuery(d).find('.woocs-style-2-avatar-large').css('background-image', 'url(' + jQuery(d).find(`div.woocs-style-2-link[data-currency=${current_currency}]`).data('flag') + ')'); 54 }); 55 }); 56}); 57 58
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.