PageSourceSearch

https://www.shopfarah.com/cdn/shop/t/4/assets/quickview.js?v=157476558698813252281598848260

js shopfarah.com collected 2026-10-09 18:26:09 UTC 7,158 bytes, 2 lines download raw bytes

1jQuery(document).ready(function($2){var currentVariants={},availableVariants=[],variantAvailability=[],multipleSelection=!1;$2(document).on("click",".quick-view",function(){currentVariants={},availableVariants=[],variantAvailability=[],variantPrices=[],variantCompareAtPrices=[];var product=$2(this).parents(".grid__item,.list__item"),productName=product.find(".grid-view-item__title").text(),productDescription=product.find(".product-desc").html(),productPrice=product.find(".grid-view-item__meta").html(),productRating=product.find(".spr-badge").html(),productDiscount=product.find(".discount-percentage").html(),productQuantity=product.find(".qv-cartmain").html();$2("#main-thumbnail").attr("src",product.find(".imgurl-for-quickview span").first().text()),product.find(".imgurl-for-quickview span").each(function(index){var html="<div class='thumb-item'><img src='"+$2(this).text()+"'></div>";qvthumbnails.trigger("add.owl.carousel",html).trigger("refresh.owl.carousel")}),$2("#qv-productname").html(productName),$2("#qv-productprice").html(productPrice),$2("#qv-spr-badge").html(productRating),$2("#qv-productdescription").html(productDescription),$2("#qv-discount").html(productDiscount),$2("#qv-quantity").html(productQuantity),multipleSelection=$2("#qv-quantity .selector-wrapper").length>0,multipleSelection&&(loadAvailableQuickViewVariants(),loadCurrentQuickViewVariants()),$2(".qv-addToCart span.adding").hide(),$2("#quickviewModal").modal("show")}),$2(document).on("click","#qv-thumbnails img",function(){$2("#main-thumbnail").attr("src",$2(this).attr("src"))}),$2(document).on("change","#qv-quantity select.single-option-selector",function(){multipleSelection&&(currentVariants[$2(this).data("index")]=$2(this).val(),checkAvailability())}),$2(document).on("click","#qv-quantity .qv-addToCart.enable",function(){$2(".cart-display #cart-container").hasClass("in")&&($2(".cart-display #cart-container").removeClass("in"),$2(".cart-display .cart-title").addClass("collapsed"),$2(".cart-display .cart-title").attr("aria-expanded","false")),qvAddToCart()}),$2(document).on("click",".cart-product-page .product-addToCart",function(){var variantID=$2('.product-selection .cart-product-page select[name="id"] option:selected').val(),qty=$2('.product-selection .cart-product-page input[name="quantity"]').val();productAddToCart(variantID,qty),$2(".cart-display #cart-container").hasClass("in")&&($2(".cart-display #cart-container").removeClass("in"),$2(".cart-display .cart-title").addClass("collapsed"),$2(".cart-display .cart-title").attr("aria-expanded","false"))});function loadCurrentQuickViewVariants(){currentVariants={},$2("#qv-quantity .selector-wrapper").each(function(index){currentVariants["option"+(index+1)]=$2(this).find("select.single-option-selector").val()}),checkAvailability()}function loadAvailableQuickViewVariants(){availableVariants=[],$2('#qv-quantity select[name="id"] > option').each(function(index){for(var variantsList=$2(this).text().split("/"),variantsKeyVal={},i2=0;i2<variantsList.length;i2++)variantsKeyVal["option"+(i2+1)]=variantsList[i2].trim();availableVariants.push(variantsKeyVal),variantAvailability.push($2(this).data("available")),variantPrices.push($2(this).data("price")),variantCompareAtPrices.push($2(this).data("compareatprice"))})}function checkAvailability(){var available=!1,backupIndex=0;for(i=0;i<availableVariants.length;){if(matchArray(availableVariants[i],currentVariants)&&(backupIndex=i),matchArray(availableVariants[i],currentVariants)&&variantAvailability[i]){available=!0;break}i++}$2('#qv-quantity select[name="id"] option').each(function(index){$2(this).removeAttr("selected","selected")}),$2('#qv-quantity select[name="id"] option').eq(backupIndex).prop("selected","selected"),$2("#qv-productprice span.qv-regularprice").text($2('#qv-quantity select[name="id"] option').eq(backupIndex).data("price")),$2("#qv-productprice span.qv-discountprice").text($2('#qv-quantity select[name="id"] option').eq(backupIndex).data("compareatprice")),available?($2("#quickviewModal .qv-addToCart").addClass("enable"),$2("#quickviewModal .qv-addToCart span.instock").show(),$2("#quickviewModal .qv-addToCart span.outstock").hide()):($2("#quickviewModal .qv-addToCart.enable").removeClass("enable"),$2("#quickviewModal .qv-addToCart span.instock").hide(),$2("#quickviewModal .qv-addToCart span.outstock").show())}function matchArray(a,b){var match=!0;for(var key in a)a[key]!=b[key]&&(match=!1);return match}function qvAddToCart(){var variantID=$2('#qv-quantity select[name="id"] option:selected').val(),qty=$2('#qv-quantity input[name="quantity"]').val();$2(".qv-addToCart span.instock").hide(),$2(".qv-addToCart span.outstock").hide(),$2(".qv-addToCart span.adding").show(),productAddToCart(variantID,qty)}$2("#quickviewModal").on("hide.bs.modal",function(){for(var itemcount=$2("#qv-thumbnails .owl-item").length,i2=0;i2<itemcount;i2++)qvthumbnails.trigger("remove.owl.carousel",i2)})});
1function productAddToCart(varID,qty){jQuery.ajax({type:"post",url:"/cart/add.js",data:"quantity="+qty+"&id="+varID,dataType:"json",success:function(n){var imessage=$("#cartmessage .title-success").text(),url="<a href="+n.url+">"+n.title+"</a>";imessage+=url+" - "+n.quantity+" x "+Shopify.formatMoney(n.discounted_price,Shopify.money_format),$.notify({message:imessage},{type:"success",offset:0,placement:{from:"top",align:"center"},z_index:9999,animate:{enter:"animated fadeInDown",exit:"animated fadeOutUp"},template:'<div data-notify="container" class="col-xs-12 alert alert-{0}" role="alert"><button type="button" aria-hidden="true" class="close" data-notify="dismiss">\xD7</button><span data-notify="icon"></span> <span data-notify="title">{1}</span> <span data-notify="message">{2}</span><div class="progress" data-notify="progressbar"><div class="progress-bar progress-bar-{0}" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%;"></div></div><a href="{3}" target="{4}" data-notify="url"></a></div>'}),adjustCartDropDown(),$(".qv-addToCart span.instock").show(),$(".qv-addToCart span.adding").hide(),$(".nm-addToCart").removeClass("adding")},error:function(n,r){var imessage=$("#cartmessage .title-failed").text();imessage+=n.responseJSON.description,$.notify({message:imessage},{type:"danger",offset:0,placement:{from:"top",align:"center"},z_index:9999,animate:{enter:"animated fadeInDown",exit:"animated fadeOutUp"},template:'<div data-notify="container" class="col-xs-12 alert alert-{0}" role="alert"><button type="button" aria-hidden="true" class="close" data-notify="dismiss">\xD7</button><span data-notify="icon"></span> <span data-notify="title">{1}</span> <span data-notify="message">{2}</span><div class="progress" data-notify="progressbar"><div class="progress-bar progress-bar-{0}" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%;"></div></div><a href="{3}" target="{4}" data-notify="url"></a></div>'}),$(".qv-addToCart span.instock").show(),$(".qv-addToCart span.adding").hide(),$(".nm-addToCart").removeClass("adding")}})}
2//# sourceMappingURL=/cdn/shop/t/4/assets/quickview.js.map?v=157476558698813252281598848260

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.