Willkommen bei WordPress. Dies ist dein erster Beitrag. Bearbeite oder lösche ihn und beginne mit dem Schreiben!
Hallo Welt!
von raredesign | Dez 3, 2019 | Allgemein | 0 Kommentare
Cokiee Shell
Current Path : /var/www/web28/html/wp-content/themes/Avada/assets/min/js/general/ |
Current File : //var/www/web28/html/wp-content/themes/Avada/assets/min/js/general/awb-woo-quick-view.js |
jQuery(document).ready(function(){let e,t;jQuery("body").on("click",".fusion-quick-view",function(i){jQuery(".fusion-woocommerce-quick-view-container").length||(jQuery("#main > .fusion-row").append(jQuery("#awb-quick-view-template").html()),jQuery("#awb-quick-view-template").remove());const o=jQuery(".fusion-woocommerce-quick-view-overlay"),n=jQuery(".fusion-woocommerce-quick-view-container"),a=n.find(".fusion-wqv-preview-image"),r=n.find(".fusion-wqv-content"),d=n.find(".fusion-wqv-close"),s=n.find(".fusion-wqv-loader"),u=jQuery(this).data("product-id"),c=jQuery(this).closest(".product"),f=c.length?c:jQuery(this).closest(".fusion-carousel-item"),l=f.find(".wp-post-image"),h=f.find(".onsale"),p=f.find(".fusion-out-of-stock"),w=f.find(".fusion-price-rating").length?f.find(".fusion-price-rating"):f.find(".price").first(),m=parseInt(l.height(),10)/parseInt(l.width(),10);let y,g=f.find(".product-title").length?f.find(".product-title"):f.find(".fusion-rollover-title"),v={},j=!1,Q=!0,_="";i.preventDefault(),jQuery("body").addClass("fusion-wqv-open"),jQuery(".fusion-wqv-open").on("keydown",function(e){27===e.keyCode&&jQuery(".fusion-wqv-close button").trigger("click")}),void 0!==u&&(0===g.length&&void 0!==jQuery(this).data("product-title")&&(g=jQuery("<p>"+jQuery(this).data("product-title")+"</p>")),r.empty(),s.find(".entry-title, .star-rating, .price").empty(),jQuery(".fusion-footer-parallax").length&&(jQuery("#main").css("z-index","auto"),"fixed"===jQuery(".fusion-footer-parallax").css("position")&&(jQuery(".fusion-footer-parallax").css("z-index","-1"),jQuery("#sliders-container").find('.tfs-slider[data-parallax="1"]').length&&jQuery("#sliders-container").css("z-index","auto"))),n.stop().fadeIn("200"),a.fadeIn("200").html(l.clone()),o.stop().fadeIn("400"),(h.length||p.length)&&(a.prepend('<div class="fusion-woo-badges-wrapper"></div>'),p.length&&(n.addClass("outofstock"),a.find(".fusion-woo-badges-wrapper").append(p.clone())),h.length&&a.find(".fusion-woo-badges-wrapper").append(h.clone())),f.find("> span, > a, > div").fadeTo("200","0"),f.addClass("fusion-faded-out"),0===l.length?(l=jQuery(i.currentTarget),void 0!==l.data("image-height")?(m=parseInt(l.data("image-height"),10)/parseInt(l.data("image-width"),10),v.startWidth=l.data("image-width"),v.startHeight=l.data("image-height")):(Q=!1,v.startWidth=400,v.startHeight=400)):(v.startWidth=l.width(),v.startHeight=l.height()),v.startTop=l.offset().top-jQuery(window).scrollTop(),v.startLeft=l.offset().left,v.endWidth=400,1.77<1/m&&(v.endWidth=500),1.77<m&&(v.endWidth=300),v.endHeight=Math.floor(v.endWidth/v.startWidth*v.startHeight),v.endTop=Math.round((jQuery(window).height()-v.endHeight)/2),v.endLeft=Math.round((jQuery(window).width()-v.endWidth)/2),v.finalWidth=Math.round(v.endWidth+500),500>jQuery(window).width()-v.endWidth&&(v.finalWidth=Math.round(jQuery(window).width()-20)),v.finalLeft=Math.round((jQuery(window).width()-v.finalWidth)/2),n.css({top:v.startTop,left:v.startLeft,width:v.startWidth,height:v.startHeight,"background-color":avadaWooCommerceVars.shop_page_bg_color}),a.css({"max-width":v.startWidth>v.endWidth?"100%":v.endWidth,"max-height":v.startWidth>v.endWidth?"auto":v.endHeight}),a.find("img").removeAttr("style"),setTimeout(function(){n.animate({top:v.endTop+"px",left:v.endLeft+"px",width:v.endWidth+"px",height:v.endHeight+"px"},800,"easeInOutCubic",function(){v.startWidth>v.endWidth&&a.css({"max-width":v.endWidth,"max-height":v.endHeight})})},200),setTimeout(function(){n.animate({left:v.finalLeft+"px",width:v.finalWidth+"px"},600,"easeInOutCubic",function(){jQuery(this).addClass("complete"),jQuery(this).css("top",""),jQuery(this).css("left","")})},1e3),setTimeout(function(){d.fadeIn("300"),40>avadaWooCommerceVars.shop_page_bg_color_lightness&&d.find("button").addClass("light"),j=!0,n.hasClass("fusion-quick-view-loaded")||(g.length&&(s.find(".entry-title").html(g.text()),parseFloat(avadaWooCommerceVars.post_title_font_size)<parseFloat(s.find(".entry-title").css("font-size"))&&s.find(".entry-title").css("font-size",parseFloat(avadaWooCommerceVars.post_title_font_size)+"px")),w.length&&(s.find(".star-rating").show(),w.hasClass("fusion-price-rating")?s.find(".fusion-price-rating").html(w.children().clone()):(s.find(".fusion-price-rating .price").html(w.clone()),f.find(".star-rating").length&&s.find(".fusion-price-rating .star-rating").html(f.find(".star-rating").first().html())),s.find(".star-rating").is(":empty")&&s.find(".star-rating").hide()),s.css("left","calc(100% - "+Math.round((v.finalWidth-v.endWidth)/2)+"px)"),s.stop().fadeTo("300","1"))},1600),jQuery.post(avadaWooCommerceVars.ajaxurl,{action:"fusion_quick_view_load",nonce:quickViewNonce,product:jQuery(this).data("product-id")},function(i){"undefined"==typeof wc_add_to_cart_variation_params?i+='<script type="text/javascript">var wc_add_to_cart_variation_params = {};<\/script>':i+='<script type="text/javascript">var wc_add_to_cart_variation_params = '+JSON.stringify(wc_add_to_cart_variation_params)+";<\/script>",n.addClass("fusion-quick-view-loaded"),e=setInterval(function(){j&&(n.addClass("fusion-animate-content fusion-quick-view-loaded"),n.find(".fusion-wqv-content").show(),setTimeout(function(){r.html(i),!Q&&r.find(".woocommerce-product-gallery .wp-post-image").length&&(a.fadeIn("200").html(r.find(".woocommerce-product-gallery .wp-post-image").first().clone()),v.endHeight=a.find("img").height(),n.animate({height:v.endHeight+"px"},800,"easeInOutCubic")),r.find(".woocommerce-product-gallery").css("width",v.endWidth+"px"),r.find(".product").not(".bundled_product").css("max-height",v.endHeight+"px"),"undefined"!=typeof productBackgroundColor&&(n.css("background-color",productBackgroundColor),40>productBackgroundColorLightness&&d.find("button").addClass("light")),"undefined"!=typeof productQuickViewSingleURL&&n.find(".woocommerce-review-link").length&&(_=n.find(".woocommerce-review-link").prop("hash"),n.find(".woocommerce-review-link").prop("href",productQuickViewSingleURL+_).addClass("avada-noscroll")),s.stop().fadeTo("300","0"),n.find(".entry-summary").animate({opacity:"1"},500,"easeInOutCubic",function(){jQuery(this).scrollTop(0)}),n.find(".entry-summary").children().animate({"padding-top":"0"},500,"easeInOutCubic")},400),setTimeout(function(){(y=n.find(".fusion-button-view-details")).css("top",y.height()),y.animate({opacity:"1",top:"0"},200,"easeInOutCubic")},700),setTimeout(function(){n.removeClass("fusion-animate-content"),jQuery("body").trigger("quick-view-displayed")},900),setTimeout(function(){fusionInitPostFlexSlider(),jQuery(window).trigger("AddAvadaSelect"),"undefined"!=typeof wc_add_to_cart_variation_params&&jQuery(".variations_form").each(function(){jQuery(this).wc_variation_form()}),avadaAddQuantityBoxes()},400),t=setInterval(function(){10>Math.abs(n.find(".flex-active-slide").width()-n.find(".fusion-wqv-preview-image").width())&&(n.find(".fusion-wqv-preview-image").fadeOut("400"),clearInterval(t))},500),clearInterval(e))},25)}))}),jQuery(document).on("click",".fusion-wqv-close button",function(i){var o=jQuery(this).closest(".fusion-woocommerce-quick-view-container");o.removeClass("fusion-quick-view-loaded"),clearInterval(e),clearInterval(t),jQuery(".fusion-wqv-open").off("keydown"),jQuery("body").removeClass("fusion-wqv-open"),jQuery(".fusion-woocommerce-quick-view-overlay").fadeOut("400"),o.stop().animate({width:o.width()/2,height:o.height()/2,opacity:"0"},300,"easeInOutCubic",function(){jQuery(this).hide(),jQuery(this).removeAttr("style"),jQuery(this).removeClass("complete"),jQuery(this).find(".fusion-wqv-preview-image").removeAttr("style"),jQuery(this).find(".entry-title").removeAttr("style"),jQuery(".fusion-footer-parallax").length&&(jQuery("#main").css("z-index",""),jQuery(".fusion-footer-parallax").css("z-index",""),jQuery("#sliders-container").css("z-index",""))}),o.find(".fusion-wqv-close").fadeOut("300"),jQuery(".fusion-faded-out").find("> span, > a, > div").fadeTo("300","1",function(){jQuery(this).css("opacity","")}),jQuery(".fusion-faded-out").removeClass("fusion-faded-out")}),jQuery(document).on("click",".fusion-woocommerce-quick-view-overlay",function(e){jQuery(".fusion-wqv-close button").trigger("click")}),jQuery(window).on("resize",function(e){var t=jQuery(".fusion-woocommerce-quick-view-container"),i=t.find(".woocommerce-product-gallery").width(),o=jQuery(window).width();jQuery("body").hasClass("fusion-wqv-open")&&(t.width()<o-20&&i+500<=o-20?t.width(i+500):t.width(o-20))})});
Cokiee Shell Web 1.0, Coded By Razor
Neueste Kommentare