PATH:
home
/
lab2454c
/
costbloc.com
/
public
/
dist
/
js
/
custom
/
site
"use strict";emptyShow(),$(document).on("click",".add-to-compare",function(){let a=$(this).attr("data-itemId");compareAjaxCall("/compare-store",a,this)}),$(document).on("click",".compare-remove",function(){let a=$(this).attr("data-itemId");compareAjaxCall("/compare-delete",a,this)});var compareClick=0;function compareAjaxCall(a,b,c){if(1<++compareClick)return!1;var d=$(c).html();setTimeout(()=>{$("div[data-itemid="+b+"]").html(` <svg class="animate-spin text-gray-700 w-full h-full" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"> <circle class="opacity-25" cx="12" cy="12" r="10" stroke="#000" stroke-width="3"></circle> <path class="opacity-75" fill="#fff" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path> </svg> `)},5),$.ajax({url:SITE_URL+a,data:{product_id:b,_token:token},type:"POST",dataType:"JSON",success:function(c){1==c.status&&(updateCompare(c.totalProduct,b),"/compare-store"==a?$("div[data-itemid="+b+"]").addClass("compare-remove").removeClass("add-to-compare"):$("div[data-itemid="+b+"]").addClass("add-to-compare").removeClass("compare-remove"))},complete:function(){$("div[data-itemid="+b+"]").html(d),compareClick=0}})}function emptyShow(a=null){0<parseInt($("#totalCompareItem").text())?($(".value-"+a).remove(),$("#compareEmpty").hide(),$(".compare-table").removeClass("display-none")):($(".compare-table").remove(),$("#compareEmpty").show(),$("#totalCompareItem").removeClass("w-4 h-4"))}function updateCompare(a=0,b){0<parseInt(a)?($("#totalCompareItem").html(a),$("#totalCompareItem").addClass("w-4 h-4")):$("#totalCompareItem").html(""),emptyShow(b)}
[-] checkout.js
[edit]
[-] be-seller.min.js
[edit]
[-] res-filter.min.js
[edit]
[-] sign_up.js
[edit]
[-] wishlist.min.js
[edit]
[-] filter.min.js
[edit]
[-] home.js
[edit]
[-] notification-popup.js
[edit]
[-] order-track.js
[edit]
[-] notification-popup.min.js
[edit]
[-] wishlist.js
[edit]
[-] description-tabs.js
[edit]
[-] vendor-profile.js
[edit]
[-] seller-registration.min.js
[edit]
[-] formatting.min.js
[edit]
[-] product-details.js
[edit]
[+]
..
[-] cart.min.js
[edit]
[-] be-seller.js
[edit]
[-] animation.min.js
[edit]
[-] product-view.min.js
[edit]
[-] address.js
[edit]
[-] lang.js
[edit]
[-] alpine.js
[edit]
[-] product-details.min.js
[edit]
[-] common.min.js
[edit]
[-] res-filter.js
[edit]
[-] order-track.min.js
[edit]
[-] common.js
[edit]
[-] drawer.js
[edit]
[-] seller.min.js
[edit]
[-] settings.js
[edit]
[-] checkout.min.js
[edit]
[-] coupon.js
[edit]
[-] login.js
[edit]
[-] seller.js
[edit]
[-] user_download.js
[edit]
[-] site.min.js
[edit]
[-] lang.min.js
[edit]
[-] seller-registration.js
[edit]
[-] password-validation.js
[edit]
[-] drawer.min.js
[edit]
[-] login.min.js
[edit]
[-] delivery-address.min.js
[edit]
[-] home.min.js
[edit]
[-] compare.js
[edit]
[-] description-tabs.min.js
[edit]
[-] all-categories.min.js
[edit]
[-] flatpickr.min.js
[edit]
[-] filter.js
[edit]
[-] cart.js
[edit]
[-] site.js
[edit]
[-] compare.min.js
[edit]
[-] animation.js
[edit]
[-] user_download.min.js
[edit]
[-] settings.min.js
[edit]
[-] vendor-profile.min.js
[edit]
[-] product-view.js
[edit]
[-] password-validation.min.js
[edit]
[-] address.min.js
[edit]
[-] formatting.js
[edit]
[-] coupon.min.js
[edit]
[-] delivery-address.js
[edit]
[-] sign_up.min.js
[edit]
[-] all-categories.js
[edit]