1$(document).ready(function () { 2 3 //initAjaxPagination(); 4 if ($('#seedbankDetector').length) { 5 $('#catSmall #allseedbanks').children('ul').show(); 6 } 7 update_wishlist_buttons(); 8 initInfiniteScroll(); 9 manageFoldedCategoryDescription(); 10 11 $('.description_read_more').click(function () { 12 $('.cat_desc').removeClass('folded'); 13 $('.description_read_more').hide(); 14 $('.description_read_less').show(); 15 }); 16 17 $('.description_read_less').click(function () { 18 $('.cat_desc').addClass('folded'); 19 $('.description_read_less').hide(); 20 $('.description_read_more').show(); 21 }); 22 23 if ($('.brands-navigation').length && window.innerWidth < 768) { 24 new Swiper('.brands-navigation', { 25 slidesPerView: 8, 26 loop: false, 27 nextButton: '.alphabet-next', 28 prevButton: '.alphabet-prev', 29 speed: 400, 30 }); 31 } else { 32 $('.alphabet').removeClass('swiper-wrapper'); 33 $('.brands-navigation').removeClass('swiper-container'); 34 $('.alphabet li').removeClass('swiper-slide'); 35 } 36 37 initNiceCombinationsSelect(); 38 equalHeightsProductCardBottom(); 39 40 if ($('.search-popular-list').length && window.innerWidth > 767) { 41 new Swiper('.search-popular-list', { 42 slidesPerView: 5, 43 loop: false, 44 spaceBetween: 20, 45 nextButton: '.search-popular-list-next', 46 prevButton: '.search-popular-list-prev', 47 speed: 400, 48 breakpoints: { 49 1199: { slidesPerView: 3 } 50 } 51 }); 52 } 53}); 54 55/** 56 * If category caching is enabled, the 'add to wishlist' buttons are initially displayed empty 57 * and when the page is loaded, the already added products are marked. 58 */ 59function update_wishlist_buttons () 60{ 61 if (typeof wishListProductsIds == 'object') { 62 $.each(wishListProductsIds, function (i, v) { 63 $('#wishlist-container'+i+v+' input.add-to-wishlist').addClass('in-wishlist'); 64 }); 65 } 66} 67 68function manageFoldedCategoryDescription() 69{ 70 var heightRowsDescription = 100; //3 rows 71 var countCurrentRowsDescription = 0; 72 if ($('.folded').length) { 73 $('.folded').children().each(function (i, el) { 74 countCurrentRowsDescription = countCurrentRowsDescription + $(el).height(); 75 }); 76 if (countCurrentRowsDescription < heightRowsDescription) { 77 $('.cat_desc').removeClass('folded'); 78 $('.description_read_less').hide(); 79 $('.description_read_more').hide(); 80 } else { 81 $('.cat_desc').addClass('folded'); 82 $('.description_read_less').hide(); 83 $('.description_read_more').show(); 84 } 85 } 86}
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.