PATH:
home
/
lab2454c
/
costbloc.com
/
public
/
dist
/
js
/
custom
/
site
"use strict";var wishlistClick=0;$(document).on("click",".wishlist",(function(){if(++wishlistClick>1)return!1;var item_id=$(this).data("id");document.cookie="product_id="+item_id;var wishlist=$(this),svg=$(this).html();setTimeout(()=>{$(this).html('\n <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">\n <circle class="opacity-25" cx="12" cy="12" r="10" stroke="#000" stroke-width="3"></circle>\n <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>\n </svg>\n ')},5),$.ajax({url:SITE_URL+"/user/wishlist/store",type:"POST",dataType:"JSON",data:{product_id:item_id,_token:token},success:function(data){document.cookie="product_id=; Max-Age=-99999999;",$(svg).hasClass("text-gray-10")?(svg=svg.replace("text-gray-10","color_fill svg-bg"),$("#totalWishlistItem").text(Number($("#totalWishlistItem").text())+1),$("#totalWishlistItem").addClass("w-4 h-4")):$(svg).hasClass("color_fill")?(svg=svg.replace("color_fill svg-bg","text-gray-10"),$("#totalWishlistItem").text(Number($("#totalWishlistItem").text())-1),0==$("#totalWishlistItem").text()&&($("#totalWishlistItem").text(""),$("#totalWishlistItem").removeClass("w-4 h-4"))):wishlist.find(".fa-heart-o").length?(wishlist.find("i").removeClass("fa-heart-o text-black"),wishlist.find("i").addClass("fa-heart text-green-500"),wishlist.find("span").text(jsLang("Remove from wishlist")),$("#totalWishlistItem").text(Number($("#totalWishlistItem").text())+1)):wishlist.hasClass("add-wishlist")?(wishlist.addClass("remove-wishlist primary-bg-color"),wishlist.removeClass("add-wishlist"),$("#totalWishlistItem").text(Number($("#totalWishlistItem").text())+1),$("#totalWishlistItem").addClass("w-4 h-4")):wishlist.hasClass("remove-wishlist")?(wishlist.addClass("add-wishlist"),wishlist.removeClass("remove-wishlist primary-bg-color"),$("#totalWishlistItem").text(Number($("#totalWishlistItem").text())-1),0==$("#totalWishlistItem").text()&&($("#totalWishlistItem").text(""),$("#totalWishlistItem").removeClass("w-4 h-4"))):(wishlist.find("i").removeClass("fa-heart text-gray-10"),wishlist.find("i").addClass("fa-heart-o text-black"),wishlist.find("span").text(jsLang("Add to wishlist")),$("#totalWishlistItem").text(Number($("#totalWishlistItem").text())-1),0==$("#totalWishlistItem").text()&&$("#totalWishlistItem").text(""))},error:function(xhr,ajaxOptions,thrownError){"401"==xhr.status&&(window.location.href=SITE_URL+"/user/login")},complete:function(){wishlist.html(svg),wishlistClick=0}})})),$(".shop-search-icon").on('click',(function(){window.innerWidth<=624&&($(".search-in-store").toggle(),$(".shop-menu").toggle())}));var clickCount=0;function preventMultipleClick(){if(++clickCount>1)return!1}
[-] 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]