1$(document).ready(function(){ 2 if (/ip(hone|od)|ipad/i.test(navigator.userAgent)) { 3 $("body").css ("cursor", "pointer"); 4 } 5 6 $('.nav-custom-toggle').on("click", function(event){ 7 var target=$(this).attr('data-toggle'); 8 // console.log(target); 9 if($(target).css('display')=="none"){ 10 $('.nav-product-cont').parent().removeClass('active'); 11 $('.nav-product-cont').slideUp('fast'); 12 $(target).slideToggle('fast'); 13 $(this).parent().addClass('active'); 14 }else{ 15 $(target).slideUp('fast'); 16 $(this).parent().removeClass('active'); 17 } 18 }); 19 20 $('.add-to-wish').on("click", function(){ 21 var liked=$(this).attr('data-liked'); 22 if(liked){ 23 $(this).children('img').attr('src','assets/img/list-icon-2-g.png'); 24 $(this).attr('data-liked',0); 25 }else{ 26 $(this).children('img').attr('src','assets/img/list-icon-2.png'); 27 $(this).attr('data-liked',1); 28 } 29 }); 30 31 $('.profile-tab').on("click", function(){ 32 var target=$(this).attr('data-target'); 33 if($(this).hasClass('open')){ 34 $(target).slideUp('fast'); 35 $(this).removeClass('open'); 36 }else{ 37 $(target).slideDown('fast'); 38 $(this).addClass('open'); 39 } 40 }); 41 42 $('.pop_up_close').click(function(){ 43 $('.pop_up').fadeOut('fast'); 44 $('body').toggleClass('pop_up_open'); 45 }); 46 47 $('.pop_up_bg').click(function(){ 48 if(!$(this).hasClass("noclose")){ 49 $('.pop_up').fadeOut('fast'); 50 $('body').removeClass('pop_up_open'); 51 } 52 }); 53 54 $('.pop_up_toggle').click(function(){ 55 var target=$(this).attr('data-toggle'); 56 $('.pop_up').fadeOut('fast'); 57 $(target).fadeIn('fast'); 58 $('body').toggleClass('pop_up_open'); 59 }); 60 61 $('.product-extra-img>li').on("click", function(event){ 62 $('.product-extra-img>li').each(function(){ 63 if($(this).hasClass('active')){ 64 $(this).removeClass('active'); 65 } 66 }); 67 68 $(this).addClass('active'); 69 var url=$(this).attr('data-src'); 70 $('#the-featured').attr('src',url); 71 }); 72 73 $('.purchase-btn-value').on("click", function(event){ 74 var act=$(this).attr('data-action'); 75 if(act=="minus"){ 76 if(document.getElementById('qty').value>1){ 77 document.getElementById('qty').value--; 78 } 79 }else if(act=="add"){ 80 document.getElementById('qty').value++; 81 } 82 83 // handle_fee(); 84 my_price(); 85 }); 86 87 $('#qty').on("change", function(){ 88 my_price(); 89 }); 90 91 $('#del_location').on("change", function(event){ 92 handle_fee(); 93 }); 94 95 $('#qty').on("change", function(event){ 96 handle_fee(); 97 }); 98 99 $('#del_date').on("change", function(event){ 100 handle_fee(); 101 }) 102 103 $('.pwp_choose').on("change", function(event){ 104 handle_fee(); 105 }); 106 107 $('.select-product-size>li').on("click", function(event){ 108 $('.select-product-size>li').removeClass('active'); 109 $(this).addClass('active'); 110 $('#enhance').val($(this).attr('data-value')); 111 112 my_price(); 113 114 $('#normal').html($(this).attr('data-price')); 115 $('#peak').html($(this).attr('data-price2')); 116 $('#superpeak').html($(this).attr('data-price3')); 117 }); 118 119 $('.addon-atc').on("click",function(){ 120 var txt; 121 if($(this).attr('data-action')!="added"){ 122 txt="Added"; 123 $(this).attr('data-action',"added"); 124 $(this).addClass("active"); 125 }else{ 126 txt="Add to cart"; 127 $(this).attr('data-action',""); 128 $(this).removeClass("active"); 129 } 130 131 $(this).find('div').html(txt); 132 }); 133 134 $('.letter-count').on("keyup",function(){ 135 var lg=$(this).val().length; 136 var max=$(this).attr('maxlength'); 137 var target=$(this).attr('data-target'); 138 139 $(target).html(max-lg); 140 }); 141 142 $('.my-collapse-toggle').on("click", function(){ 143 var target=$(this).attr('data-target'); 144 var txt; 145 if($(this).hasClass('active')){ 146 txt=$(this).attr('data-open'); 147 $(target).slideUp('fast'); 148 $(this).removeClass('active'); 149 }else{ 150 txt=$(this).attr('data-close'); 151 $(target).slideDown('fast'); 152 $(this).addClass('active'); 153 } 154 $(this).html(txt); 155 }); 156 157 $(window).on('resize', function() { 158 if($(window).width() > 992) { 159 var panel = $("#information"); 160 var btn = $("#information_btn"); 161 rotate_caret(panel, btn); 162 panel.addClass('in'); 163 }else if($(window).width() > 319){ 164 var panel = $("#information"); 165 var btn = $("#information_btn");
166 rotate_caret(panel, btn); 167 panel.removeClass('in'); 168 } 169 170 if($(window).width() > 992) { 171 var panel = $("#description"); 172 var btn = $("#description_btn"); 173 rotate_caret(panel, btn); 174 panel.addClass('in'); 175 }else if($(window).width() > 319){ 176 var panel = $("#description"); 177 var btn = $("#description_btn"); 178 // rotate_caret(panel, btn); 179 // panel.removeClass('in'); 180 } 181 }); 182 183 if($(window).width() > 992) { 184 var panel = $("#information"); 185 var btn = $("#information_btn"); 186 panel.addClass('in'); 187 }else if($(window).width() > 319){ 188 var panel = $("#information"); 189 var btn = $("#information_btn"); 190 rotate_caret(panel, btn); 191 panel.removeClass('in'); 192 } 193 194 if($(window).width() > 992) { 195 var panel = $("#description"); 196 var btn = $("#description_btn"); 197 panel.addClass('in'); 198 }else if($(window).width() > 319){ 199 var panel = $("#description"); 200 var btn = $("#description_btn"); 201 // rotate_caret(panel, btn); 202 // panel.removeClass('in'); 203 } 204 205 $("#description_btn").click(function() { 206 var panel = $("#description"); 207 var btn = $("#description_btn"); 208 rotate_caret(panel, btn); 209 }); 210 211 $("#information_btn").click(function() { 212 var panel = $("#information"); 213 var btn = $("#information_btn"); 214 rotate_caret(panel, btn); 215 }); 216}); 217 218function my_price(){ 219 var price=$('.select-product-size>.active').attr('data-price'); 220 var qty=$('#qty').val(); 221 222 var total=parseFloat(price*qty); 223 224 $('#my-price>span').html(total); 225} 226 227function rotate_caret(panel ,btn) { 228 if(panel.hasClass("in")) { 229 btn.find('.caret').removeClass("active"); 230 } else if(!panel.hasClass("in")){ 231 btn.find('.caret').addClass("active"); 232 } 233} 234 235$(document).ready(function() { 236 $('body').on('click', '.dropdownmenu', function(e) { 237 e.preventDefault(); 238 $(this).parents('.dropdown').siblings('.dropdown').removeClass('open'); 239 $(this).parents('.dropdown').toggleClass("open"); 240 }); 241});
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.