1(function ($) { 2 "use strict"; 3 4 $(document).ready(function () { 5 if ($(".swp-isotope").length) { 6 var filterArea = $(".swp-isotope-area"); 7 8 filterArea.each(function () { 9 var filterAreaId = $(this).data("filter-section"); 10 11 var Self = $(this); 12 13 Self.find(".swp-isotope").addClass(filterAreaId); 14 15 var $galleryFilterArea = $("." + filterAreaId); 16 17 //button 18 Self.find(".isotope-filters").addClass("swp" + filterAreaId); 19 20 var $galleryFilterMenu = $(".swp" + filterAreaId); 21 22 /*Filter*/ 23 $galleryFilterMenu.on("click", "button, a", function () { 24 var $this = $(this), 25 $filterValue = $this.attr("data-filter"); 26 $galleryFilterMenu.find("button, a").removeClass("active"); 27 $this.addClass("active"); 28 $galleryFilterArea.isotope({ filter: $filterValue }); 29 }); 30 /*Grid*/ 31 $galleryFilterArea.each(function () { 32 var $this = $(this), 33 $galleryFilterItem = ".swp-item"; 34 $this.imagesLoaded(function () { 35 $this.isotope({ 36 itemSelector: $galleryFilterItem, 37 percentPosition: true, 38 masonry: { 39 columnWidth: ".swp-sizer", 40 }, 41 }); 42 }); 43 }); 44 }); 45 } 46 }); 47 48 $(document).on("added_to_cart", function (event, fragments, cart_hash) { 49 $(".product").unblock(); 50 $("body").append(fragments["custom_message"]); 51 setTimeout(function () { 52 $("#custom-message").fadeOut("slow").remove(); 53 }, 3000); // Hide the message after 3 seconds 54 }); 55 56 $(document).on("click", ".add_to_cart_button", function () { 57 $(this) 58 .closest(".product") 59 .block({ 60 message: null, 61 overlayCSS: { 62 background: "#fff", 63 opacity: 0.6, 64 }, 65 }); 66 }); 67})(jQuery);
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.