1jQuery(document).ready(function($){ 2 if ( $.isFunction($.fn.masonry) ) { 3 $('.grid').masonry({ 4 // options 5 itemSelector: '.grid-item', 6 fitWidth: true 7 }); 8 } 9 10 $('#menu_toggl').on('click', function(){ 11 $('#sticky-menu').show(); 12 }); 13 14 $('.menu-close').on('click', function(){ 15 $('#sticky-menu').hide(); 16 }); 17 18}); 19 20 21function litLabels(){ 22 $('.tag-filter').each(function(){ 23 var $label = $(this); 24 var i = $label.find(':checkbox'); 25 if(i.is(':checked')){ 26 $label.addClass('lit'); 27 }else{ 28 $label.removeClass('lit'); 29 } 30 }); 31} 32 33function triggerGoforIt(forcePage) { 34 var SelectedCats = $(".cat-item :checkbox:checked").map(function(){return $(this).val()}).get(); 35 var SelectedTags = $(".product-filters :checkbox:checked").map(function(){return $(this).val()}).get(); 36 $('.product-card ').hide(); 37 $('.product-card ').each(function () { 38 var item = $(this); 39 var itemCats= eval(item.data('cats')); 40 var itemTags = eval(item.data('tags')); 41 42 console.log('---------------'); 43 console.log("Selected cats: " + JSON.stringify(SelectedCats)); 44 console.log("item cats: " + JSON.stringify(itemCats)); 45 46 console.log('itemTags.length_'+itemTags.length); 47 console.log('---------------'); 48 49 if ((SelectedTags.length === 0) || findCommonElement(SelectedTags , itemTags)) { 50 console.log('ok tags'); 51 if ((SelectedCats.length === 0) || findCommonElement(SelectedCats , itemCats)) { 52 console.log("EXIST!"); 53 item.show(); 54 } 55 } 56 57 58 }); 59 60} 61 62 63 64function findCommonElement(array1, array2) { 65 66 for(let i = 0; i < array1.length; i++) { 67 68 for(let j = 0; j < array2.length; j++) { 69 70 if(parseInt(array1[i]) === parseInt(array2[j])) { 71 72 return true; 73 } 74 } 75 } 76 return false; 77}
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.