1$(document).ready(function () { 2 3 //BXSLIDER 4 $('.bxslider').bxSlider({ 5 mode: 'fade', 6 captions: false, 7 adaptiveHeight: true, 8 responsive: true, 9 pager: false, 10 controls: false, 11 auto: true, 12 }); 13 14 //STICKY 15 //sticky(); 16 17 //NAVIGATION 18 $('.hamburger-menu, .close-menu').bind("click", function (e) { 19 e.preventDefault(); 20 $('.icon-search').toggle(); 21 $('.menu').removeClass('menu-search'); 22 $('.menu').css('right', 'auto'); 23 $('.menu').css('left', '0'); 24 if ($('.menu').css('display') == 'none') { 25 $('body').toggleClass('overlay-on'); 26 } 27 $('.menu').animate({width: 'toggle'}, 100, function () { 28 if ($('.menu').css('display') == 'none') { 29 $('body').toggleClass('overlay-on'); 30 } 31 }); 32 $('.close-menu').toggle(); 33 $('.hamburger-menu').toggle(); 34 $('.items-list > .menu-item').removeClass('hide-mobile'); 35 $('.sub-menu').removeClass('show-mobile'); 36 }); 37 38 $('.hamburger-search, .close-search').bind("click", function (e) { 39 e.preventDefault(); 40 $('.icon-menu').toggle(); 41 $('.menu').addClass('menu-search'); 42 $('.menu').css('left', 'auto'); 43 $('.menu').css('right', '0'); 44 if ($('.menu').css('display') == 'none') { 45 $('body').toggleClass('overlay-on'); 46 } 47 $('.menu').animate({width: 'toggle'}, 100, function () { 48 if ($('.menu').css('display') == 'none') { 49 $('body').toggleClass('overlay-on'); 50 } 51 }); 52 $('.close-search').toggle(); 53 $('.hamburger-search').toggle(); 54 55 }); 56 57 58 $('.menu-item-has-children > a').bind("click", function (e) { 59 $('.items-list > .menu-item').addClass('hide-mobile'); 60 $(this).parent().removeClass('hide-mobile'); 61 $('.sub-menu', $(this).parent()).addClass('show-mobile'); 62 return false; 63 }); 64 65 $(window).resize(function () { 66 if ($(window).width() > 980) { 67 $('.menu').show(); 68 $('.close-menu').hide(); 69 $('.close-search').hide(); 70 $('.hamburger-menu').hide(); 71 $('.hamburger-search').hide(); 72 $('body').removeClass('menu-on'); 73 $('.items-list > .menu-item').removeClass('hide-mobile'); 74 //$('.sub-menu').hide(); 75 } else { 76 $('.menu').hide(); 77 $('.close-menu').hide(); 78 $('.close-search').hide(); 79 $('.hamburger-menu').show(); 80 $('.hamburger-search').show(); 81 $('.icon-search').show(); 82 $('.icon-menu').show(); 83 $('body').removeClass('menu-on'); 84 $('.items-list > .menu-item').removeClass('hide-mobile'); 85 //$('.sub-menu').hide(); 86 } 87 88 }); 89 90 window.onload = resizeAllGridItems(); 91 window.addEventListener("resize", resizeAllGridItems); 92 93 allItems = document.getElementsByClassName("item"); 94 for (x = 0; x < allItems.length; x++) { 95 imagesLoaded(allItems[x], resizeInstance); 96 } 97 98 $(".photozoom").fancybox({ 99 100 }); 101 102 103 104}); 105 106function sticky() { 107 $(window).scroll(function () { 108 console.log(($(window).height() / 2 + $(this).scrollTop() + $('.post-follow > div').height())); 109 console.log($('.post-content').offset().top + $('.post-content').height()); 110 111 if ($(window).width() > 980) { 112 if (($(window).height() / 2 + $(this).scrollTop()) > $('.post-follow').offset().top) { 113 $('.post-follow').addClass("is_sticky"); 114 } else { 115 $('.post-follow').removeClass("is_sticky"); 116 } 117 118 if (($(window).height() / 2 + $(this).scrollTop() + $('.post-follow > div').height()) > ($('.post-content').offset().top + $('.post-content').height())) { 119 $('.post-follow').addClass("is_bottom"); 120 } else { 121 $('.post-follow').removeClass("is_bottom"); 122 } 123 124 } else { 125 $('.post-follow').removeClass("is_sticky"); 126 $('.post-follow').removeClass("is_bottom"); 127 } 128 129 /*if ($(this).scrollTop() > 250) { 130 $('header.header').css('min-height', $('header.header').css('height')); 131 $('header .sticky').addClass("is_sticky"); 132 } else { 133 $('header .sticky').removeClass("is_sticky"); 134 } 135 136 if ($(window).width() > 980) { 137 if ($(this).scrollTop() > $('.post-content').offset().top) { 138 $('.post-follow').addClass("is_sticky"); 139 } else { 140 $('.post-follow').removeClass("is_sticky"); 141 } 142 143 if (($(this).scrollTop() + $(window).height()) > ($('.post-content').offset().top + $('.post-content').height())) { 144 $('.post-follow').addClass("is_bottom"); 145 } else { 146 $('.post-follow').removeClass("is_bottom"); 147 } 148 } else { 149 $('.post-follow').removeClass("is_sticky"); 150 $('.post-follow').removeClass("is_bottom"); 151 }*/ 152 153 });
154 $(window).resize(function () { 155 $('header .sticky').removeClass("is_sticky"); 156 $('header.header').css('min-height', 'auto'); 157 $('header.header').css('min-height', $('header.header').css('height')); 158 }); 159} 160 161function resizeGridItem(item) { 162 grid = document.getElementsByClassName("gallery")[0]; 163 rowHeight = parseInt(window.getComputedStyle(grid).getPropertyValue('grid-auto-rows')); 164 rowGap = parseInt(window.getComputedStyle(grid).getPropertyValue('grid-row-gap')); 165 rowSpan = Math.ceil((item.querySelector('.content').getBoundingClientRect().height + rowGap) / (rowHeight + rowGap)); 166 item.style.gridRowEnd = "span " + rowSpan; 167} 168 169function resizeAllGridItems() { 170 allItems = document.getElementsByClassName("item"); 171 for (x = 0; x < allItems.length; x++) { 172 resizeGridItem(allItems[x]); 173 } 174} 175 176function resizeInstance(instance) { 177 item = instance.elements[0]; 178 resizeGridItem(item); 179} 180
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.