minified single-product.js
This commit is contained in:
parent
88dbd15c4b
commit
dc126ac7f4
|
@ -1 +1 @@
|
|||
jQuery(function(a){return"undefined"==typeof wc_single_product_params?!1:(a(".woocommerce-tabs .panel").hide(),a(".woocommerce-tabs ul.tabs li a").click(function(){var b=a(this),c=b.closest(".woocommerce-tabs");return a("ul.tabs li",c).removeClass("active"),a("div.panel",c).hide(),a("div"+b.attr("href"),c).show(),b.parent().addClass("active"),!1}),a(".woocommerce-tabs").each(function(){var b=window.location.hash,c=window.location.href;b.toLowerCase().indexOf("comment-")>=0?a("ul.tabs li.reviews_tab a",a(this)).click():a("ul.tabs li:first a",a(this)).click(),c.indexOf("comment-page-")>0||c.indexOf("cpage=")>0?a("ul.tabs li.reviews_tab a",a(this)).click():a("ul.tabs li:first a",a(this)).click()}),a("a.woocommerce-review-link").click(function(){return a(".reviews_tab a").click(),!0}),a("#rating").hide().before('<p class="stars"><span><a class="star-1" href="#">1</a><a class="star-2" href="#">2</a><a class="star-3" href="#">3</a><a class="star-4" href="#">4</a><a class="star-5" href="#">5</a></span></p>'),a("body").on("click","#respond p.stars a",function(){var b=a(this),c=a(this).closest("#respond").find("#rating");return c.val(b.text()),b.siblings("a").removeClass("active"),b.addClass("active"),!1}).on("click","#respond #submit",function(){var b=a(this).closest("#respond").find("#rating"),c=b.val();return b.size()>0&&!c&&"yes"==wc_single_product_params.review_rating_required?(alert(wc_single_product_params.i18n_required_rating_text),!1):void 0}),void a("form.cart").submit(function(){a(this).find(":submit").attr("disabled","disabled")}))});
|
||||
jQuery(function(e){if(typeof wc_single_product_params==="undefined")return false;e(".woocommerce-tabs .panel").hide();e(".woocommerce-tabs ul.tabs li a").click(function(){var t=e(this),n=t.closest(".woocommerce-tabs");e("ul.tabs li",n).removeClass("active");e("div.panel",n).hide();e("div"+t.attr("href"),n).show();t.parent().addClass("active");return false});e(".woocommerce-tabs").each(function(){var t=window.location.hash,n=window.location.href,r=e(this);if(t.toLowerCase().indexOf("comment-")>=0){e("ul.tabs li.reviews_tab a",r).click()}else if(n.indexOf("comment-page-")>0||n.indexOf("cpage=")>0){e("ul.tabs li.reviews_tab a",e(this)).click()}else{e("ul.tabs li:first a",r).click()}});e("a.woocommerce-review-link").click(function(){e(".reviews_tab a").click();return true});e("#rating").hide().before('<p class="stars"><span><a class="star-1" href="#">1</a><a class="star-2" href="#">2</a><a class="star-3" href="#">3</a><a class="star-4" href="#">4</a><a class="star-5" href="#">5</a></span></p>');e("body").on("click","#respond p.stars a",function(){var t=e(this),n=e(this).closest("#respond").find("#rating");n.val(t.text());t.siblings("a").removeClass("active");t.addClass("active");return false}).on("click","#respond #submit",function(){var t=e(this).closest("#respond").find("#rating"),n=t.val();if(t.size()>0&&!n&&wc_single_product_params.review_rating_required==="yes"){alert(wc_single_product_params.i18n_required_rating_text);return false}});e("form.cart").submit(function(){e(this).find(":submit").attr("disabled","disabled")})})
|
Loading…
Reference in New Issue