Thay ép kính Nokia

Hiển thị tất cả %d kết quả

(function($) {  /* xem them mo ta chuyen muc san pham*/ var status="more"; function toggleText(text, isScroll){ if(status=="less"){ jQuery(".shop-container .term-description").html(text+ ' Ẩn'); if(isScroll==1){ scrollToDescription(); jQuery(".shop-container .term-description").fadeIn(3000); } status="more"; }else if(status=="more"){ jQuery(".shop-container .term-description").html(htmlSubstring(text, 1000)+ ' Xem'); jQuery('#toggleButton').text("Xem thêm"); if(isScroll==1){ jQuery(".shop-container .term-description").fadeIn(3000); } status="less" }} function scrollToDescription(){ jQuery([document.documentElement, document.body]).animate({ scrollTop: jQuery(".shop-container .term-description").offset().top - 200 }, 1000); } function htmlSubstring(s, n){ var m, r=/<([^>s]*)[^>]*>/g, stack=[], lasti=0, result=''; while ((m=r.exec(s))&&n){ var temp=s.substring(lasti, m.index).substr(0, n); result +=temp; n -=temp.length; lasti=r.lastIndex; if(n){ result +=m[0]; if(m[1].indexOf('/')===0){ stack.pop(); }else if(m[1].lastIndexOf('/')!==m[1].length - 1){ stack.push(m[1]); }} } result +=s.substr(lasti, n) + '....'; while (stack.length){ result +=''; } return result; } jQuery(document).ready(function(){ var current_html=jQuery('.shop-container .term-description').html(); jQuery(document).on('click','#toggleButton',function(){ toggleText(current_html, 1); }); if(jQuery(current_html).length > 0){ toggleText(current_html, 0); }}); jQuery(document).ready(function($){ jQuery(document).on('change', '.woo-variation-raw-select', function (e){ let title=$(this).find('option:selected').text(); let value=$(this).find('option:selected').parent().attr('id'); $('.label-title-'+value+'.attribute_title').text(title); }); $('.woo-variation-raw-select').trigger('change'); }); })(jQuery);