ok
Direktori : /proc/thread-self/root/home2/selectio/public_html/thecomponents.in/vendor/compare/ |
Current File : //proc/thread-self/root/home2/selectio/public_html/thecomponents.in/vendor/compare/compare.min.js |
"use strict";window.Riode||(window.Riode={}),function(e){Riode.productCompare=function(){e(document).on("click",".product a.compare:not(.remove_from_compare)",(function(o){if(o.preventDefault(),!e(this).find(".d-loading").length){var t=e(this);t.data("product_id"),e(".header .compare-dropdown").length&&e(".header .compare-dropdown").data("minicompare-type");Riode.doLoading(t,"small")}})).on("click",".remove_from_compare",(function(o){if(o.preventDefault(),!e(this).find(".d-loading").length){var t=e(this);t.data("product_id");t.closest(".mini-item").length?Riode.doLoading(t.closest(".mini-item"),"small"):Riode.doLoading(t,"small")}})).on("added_to_compare",(function(o,t){if(e('.compare[data-product_id="'+t+'"]').addClass("remove_from_compare"),e(".header .compare-open").length){var a=e(".header .compare-open").find(".compare-count"),i=e(".header .compare-dropdown");if(a.length){var r=a.html();r=r.replace(/[^0-9]/,""),r=parseInt(r)+1,a.html(r)}i.find(".empty-msg").length&&i.find(".widget_compare_content").html(e("script.riode-minicompare-list-html").html()),i.find(".compare-list").append()}})).on("removed_from_compare",(function(o,t){if(e('.compare[data-product_id="'+t+'"]').removeClass("remove_from_compare"),e(".header .compare-open").length){var a=e(".header .compare-open").find(".compare-count"),i=e(".header .compare-dropdown");if(a.length){var r=a.html();r=r.replace(/[^0-9]/,""),r=parseInt(r)-1,a.html(r)}i.find(".mini-item").length>1?i.find('.remove_from_compare[data-product_id="'+t+'"]').closest(".mini-item").remove():i.find(".widget_compare_content").html(e("script.riode-minicompare-no-item-html").html())}})).on("click",".riode-compare-table .to-left, .riode-compare-table .to-right",(function(o){if(o.preventDefault(),!e(this).closest(".compare-basic-info").find(".d-loading").length){var t=e(this),a=t.closest(".compare-value").index()-1;e(this).closest(".riode-compare-table").find(".compare-row").each((function(){var o=e(this).children(".compare-value").eq(a),i=t.hasClass("to-left")?o.prev():o.next(),r=(t.hasClass("to-left")?"-":"")+"20%",n=(t.hasClass("to-left")?"":"-")+"20%";o.animate({left:r},200,(function(){o.css("left",""),t.hasClass("to-left")?o.after(i):o.before(i)})),i.animate({left:n},200,(function(){i.css("left","")}))}))}})).on("click",".compare-offcanvas .compare-open",(function(o){e(this).closest(".compare-dropdown").toggleClass("opened"),o.preventDefault()})).on("click",".compare-offcanvas .btn-close",(function(o){o.preventDefault(),e(this).closest(".compare-dropdown").removeClass("opened")})).on("click",".compare-offcanvas .compare-overlay",(function(o){e(this).closest(".compare-dropdown").removeClass("opened")})).on("riode_minicart_popup_product",(function(e){return void 0===e&&void 0===e[1]?{}:e[1].closest(".minipopup-box").length?{link:(o=e[1].closest(".minipopup-box").find(".product")).find(".product-media > a").attr("href"),image:o.find(".product-media img").attr("src"),title:o.find(".product-title").text(),price:o.find(".price").html()}:e[1].closest(".riode-compare-table").length?{link:(o=e[1].closest(".compare-basic-info")).find(".product-title").attr("href"),image:o.find(".product-media img").attr("src"),title:o.closest(".riode-compare-table").find(".compare-title .compare-value").eq(e[1].closest(".compare-value").index()-1).find(".product-title").html(),price:o.closest(".riode-compare-table").find(".compare-price .compare-value").eq(e[1].closest(".compare-value").index()-1).html()}:{};var o}))},e(window).on("riode_complete",Riode.productCompare)}(jQuery);