1$(document).ready(function() { 2 3 var zI = 20; 4 $("div.products .item, .products-accessories .item").mouseenter(function() { 5 $(this).css({"z-index" : zI}); 6 zI++; 7 $("header").css({"z-index" : zI}); 8 }); 9 10 $("header nav .dropdown .dropbtn").mouseenter(function() { 11 $("div.products .item, .products-accessories .item").css({"z-index" : 1}); 12 }); 13 14 15 $("div.products .item, .products-accessories .item").click(function() { 16 var url = $(this).find("a").attr("href"); 17 document.location.href = url; 18 }); 19 20 $(".category_navigation li a").click(function() { 21 $(".category_navigation li.active").removeClass("active"); 22 $(this).closest("li").addClass("active"); 23 var _view = $(this).attr("data-view"); 24 $(".products").attr({"data-view" : _view}); 25 setTimeout(function(){ filterProducts(); }, 10); 26 document.cookie = "_category_view="+_view+"; path=/"; 27 }); 28 29 filterProducts = function() { 30 $('.products .item').removeClass("item-show"); 31 $('.products .item').removeClass("products__bt"); 32 33 var _view = $(".category_navigation li.active a").attr("data-view"); 34 var _sort = $(".form-subcategory-filter select[name='sort']").val(); 35 var _filter = new Array(); 36 $(".form-subcategory-filter select[name*='filter']").each(function(){ 37 var className = $(this).val(); 38 if (className != "" && className != 0 && className != "0") { 39 _filter.push("."+className); 40 } 41 }); 42 if (_filter.length > 0) { 43 _filter = _filter.join(""); 44 $grid.isotope({ filter: _filter, sortBy: _sort}); 45 } else { 46 $grid.isotope({ filter: '*', sortBy: _sort}) 47 } 48 49 console.log(_sort, _filter); 50 51 $grid.one('arrangeComplete', function() { 52 $('.products .item').each(function() { 53 if ($(this).css("display") != "none") { 54 $(this).addClass("item-show"); 55 } 56 }); 57 58 var _max = 0; 59 if (_view == "thumbs") { 60 _max = 8; 61 } else if (_view == "medium") { 62 _max = 2; 63 } 64 65 var _count = $('.products .item-show').length; 66 if (_count == 0) { 67 $(".products-filter-not-found").slideDown(); 68 } 69 else { 70 $(".products-filter-not-found").slideUp(); 71 72 if (_count < parseInt(_max)) { 73 $('.products .item-show').addClass("products__bt"); 74 $('.products').removeClass("products__bt"); 75 } 76 else { 77 $('.products').addClass("products__bt"); 78 } 79 } 80 81 }); 82 } 83 84 $(".form-subcategory-filter select").change(function() 85 { 86 filterProducts(); 87 }); 88 89 var $grid = $('.products').isotope({ 90 itemSelector: '.item', 91 layoutMode: 'fitRows', 92 getSortData: { 93 priority: '.priority parseInt', 94 volumeMax: '.volumeMax parseInt', 95 pressureStaticMax: '.pressureStaticMax parseInt', 96 weight: '.weight parseInt', 97 }, 98 sortAscending: { 99 priority: true, 100 volumeMax: false, 101 pressureStaticMax: false, 102 weight: true 103 } 104 }); 105 106 $('.test').click(function() { 107 $grid.isotope({ filter: '.canal-rectangular' }) 108 }); 109 110 filterProducts(); 111 112});
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.