1jQuery(document).ready(function() { 2 3 jQuery('#hamburger.classic').on('click', function() { 4 if(jQuery(this).hasClass('clicked')) { 5 jQuery(this).removeClass('clicked'); 6 jQuery('.site__header__container').removeClass('nav-open'); 7 jQuery('#primary-nav').removeClass('clicked'); 8 } else { 9 jQuery(this).addClass('clicked'); 10 jQuery('.site__header__container').addClass('nav-open'); 11 jQuery('#primary-nav').addClass('clicked'); 12 } 13 }); 14 15 // Hamburger toggle menu 16 jQuery('#primary-nav ul li.menu-item-has-children').on('click', function() { 17 if(jQuery(this).hasClass('clicked')) { 18 jQuery(this).removeClass('clicked'); 19 } 20 else { 21 jQuery('#primary-nav ul li.menu-item-has-children').removeClass('clicked'); 22 jQuery(this).addClass('clicked'); 23 } 24 }); 25 26 jQuery('#primary-nav ul li.menu-item-has-children a').on('click', function(e) { 27 if ( jQuery(this).closest('li.menu-item-has-children').hasClass('clicked') ) { 28 e.stopPropagation(); 29 } 30 else { 31 e.preventDefault(); 32 } 33 }); 34 35 setTimeout( function() { 36 jQuery('#primary-nav ul li.menu-item-has-children').each(function() { jQuery(this).removeClass( 'clicked' ); }); 37 }, 1000 ); 38 39 // Counter up init 40 function initCountUp() { 41 jQuery('.counter').each(function() { 42 var $this = jQuery(this), 43 countTo = $this.attr('data-count'); 44 jQuery({ countNum: $this.text()}).animate({ 45 countNum: countTo 46 }, 47 { 48 duration: 2000, 49 easing:'linear', 50 step: function() { 51 $this.text(Math.floor(this.countNum)); 52 }, 53 complete: function() { 54 $this.text(this.countNum.toLocaleString()); 55 //alert('finished'); 56 } 57 }); 58 }); 59 } 60 initCountUp(); 61 62 // Smooth Scroll 63 jQuery(function() { 64 jQuery('a[href*="#"]:not([href="#"])').click(function() { 65 if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) { 66 var target = jQuery(this.hash); 67 target = target.length ? target : jQuery('[name=' + this.hash.slice(1) +']'); 68 if (target.length) { 69 if(jQuery('body').hasClass('admin-bar')) { 70 jQuery('html,body').animate({ 71 scrollTop: target.offset().top - 152 72 }, 500); 73 } else { 74 jQuery('html,body').animate({ 75 scrollTop: target.offset().top - 133 76 }, 500); 77 } 78 } 79 } 80 }); 81 }); 82 83 // jQuery(document).imagesLoaded(function() { 84 // Lazy load recent posts on page load, not JUST on scroll 85 jQuery('.lazy').each(function() { 86 var scroll = jQuery(window).scrollTop(); 87 if(scroll >= jQuery(this).offset().top - Math.floor(jQuery(window).height() - 100) ) { 88 jQuery(this).attr('loaded', 'true'); 89 jQuery(this).addClass('animated'); 90 if(jQuery(this).hasClass('fade-in-up')) { 91 jQuery(this).addClass('fadeInUp'); 92 } 93 if(jQuery(this).hasClass('fade-in-down')) { 94 jQuery(this).addClass('fadeInDown'); 95 } 96 if(jQuery(this).hasClass('fade-in-left')) { 97 jQuery(this).addClass('fadeInLeft'); 98 } 99 if(jQuery(this).hasClass('fade-in-right')) { 100 jQuery(this).addClass('fadeInRight'); 101 } 102 if(jQuery(this).hasClass('fade-in')) { 103 jQuery(this).addClass('fadeIn'); 104 } 105 if(jQuery(this).hasClass('slide-in-right')) { 106 jQuery(this).addClass('slideInRight'); 107 jQuery(this).css('opacity', '1.0'); 108 } 109 if(jQuery(this).hasClass('slide-in-left')) { 110 jQuery(this).addClass('slideInLeft'); 111 jQuery(this).css('opacity', '1.0'); 112 } 113 if(jQuery(this).hasClass('zoom-in')) { 114 jQuery(this).addClass('zoomIn'); 115 jQuery(this).css('opacity', '1.0'); 116 } 117 } 118 }); 119 120 jQuery('.project-images ul').slick({ 121 slidesToShow: 2, 122 autoplay: true, 123 // variableWidth: true, 124 responsive: [ 125 { 126 breakpoint: 767, 127 settings: { 128// speed: 2000,
129// cssEase: 'linear', 130 autoplay: true, 131 slidesToShow: 1, 132 slidesToScroll: 1, 133// variableWidth: false, 134 } 135 }, 136 ] 137 }); 138 139 jQuery('.testimonial-block .testimonials').slick({ 140 slidesToShow: 1, 141 speed: 1000, 142 autoplay: true, 143 dots: true, 144 }); 145 146}); 147 148jQuery(window).on('resize', function() { 149 150}); 151 152jQuery(window).on('scroll', function() { 153// var scroll = jQuery(window).scrollTop(); 154// var alertHeight = jQuery('.alert-banner').outerHeight(); 155// if(scroll >= alertHeight) { 156// jQuery('.site-header.has-alert').addClass('scrolled'); 157// } else { 158// jQuery('.site-header.has-alert').removeClass('scrolled'); 159// } 160 161 var scroll = jQuery(document).scrollTop(); 162 if(scroll > 0) { 163 jQuery('header').addClass('shrink'); 164 } else { 165 jQuery('header').removeClass('shrink'); 166 } 167 168 var scroll = jQuery(window).scrollTop(); 169 jQuery('.lazy').each(function() { 170 if(scroll >= jQuery(this).offset().top - Math.floor(jQuery(window).height() - 200) ) { 171 jQuery(this).attr('loaded', 'true'); 172 jQuery(this).addClass('animated'); 173 if(jQuery(this).hasClass('fade-in-up')) { 174 jQuery(this).addClass('fadeInUp'); 175 } 176 if(jQuery(this).hasClass('fade-in-down')) { 177 jQuery(this).addClass('fadeInDown'); 178 } 179 if(jQuery(this).hasClass('fade-in-left')) { 180 jQuery(this).addClass('fadeInLeft'); 181 } 182 if(jQuery(this).hasClass('fade-in-right')) { 183 jQuery(this).addClass('fadeInRight'); 184 } 185 if(jQuery(this).hasClass('fade-in')) { 186 jQuery(this).addClass('fadeIn'); 187 } 188 if(jQuery(this).hasClass('slide-in-right')) { 189 jQuery(this).addClass('slideInRight'); 190 jQuery(this).css('opacity', '1.0'); 191 } 192 if(jQuery(this).hasClass('slide-in-left')) { 193 jQuery(this).addClass('slideInLeft'); 194 jQuery(this).css('opacity', '1.0'); 195 } 196 if(jQuery(this).hasClass('zoom-in')) { 197 jQuery(this).addClass('zoomIn'); 198 jQuery(this).css('opacity', '1.0'); 199 } 200 } 201 }); 202 203 if (scroll > 20) { 204 jQuery('.site-header').addClass('scrolled'); 205 jQuery('.site-main').addClass('scrolled'); 206 } else { 207 jQuery('.site-header').removeClass('scrolled'); 208 jQuery('.site-main').removeClass('scrolled'); 209 } 210 211}); 212 213 214
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.