1jQuery(document).ready(function($) { 2 3 4 var loader = $('#loader'); 5 var loader_container = $('#preloader'); 6 var scroll = $(window).scrollTop(); 7 var scrollup = $('.backtotop'); 8 var menu_toggle = $('.menu-toggle'); 9 var dropdown_toggle = $('button.dropdown-toggle'); 10 var nav_menu = $('.main-navigation'); 11 var introduction_slider = $('.introduction-slider'); 12 var portfolio_slider = $('.portfolio-slider'); 13 var filtering = $('.filtering-posts'); 14 15 16/* BACK TO TOP */ 17 18 $(window).scroll(function() { 19 if ($(this).scrollTop() > 40) { 20 scrollup.css({bottom:"25px"}); 21 22 if(document.getElementById("scroll-cart")) { 23 document.getElementById("scroll-cart").style.display = "block"; 24 } 25 } 26 else { 27 scrollup.css({bottom:"-100px"}); 28 if(document.getElementById("scroll-cart")) { 29 document.getElementById("scroll-cart").style.display = "none"; 30 } 31 } 32 }); 33 34 scrollup.click(function() { 35 $('html, body').animate({scrollTop: '0px'}, 800); 36 return false; 37 }); 38 39 $(".menu-search-icon").click(function() { 40 $(".menu-search-form").toggleClass("display-search"); 41 $(".menu-search-form .search-field").focus(); 42 return false; 43 }); 44 45 46 $(".menu-search-icon").keydown(function(e){ 47 if (e.key == "Enter") { 48 $(".menu-search-form").toggleClass("display-search"); 49 $(".menu-search-form .search-field").focus(); 50 return false; 51 } 52 }); 53 54 55 56 57 58/* MAIN NAVIGATION */ 59 60 menu_toggle.click(function(){ 61 nav_menu.slideToggle(); 62 $(this).toggleClass('active'); 63 $('.menu-overlay').toggleClass('active'); 64 $('.main-navigation').toggleClass('menu-open'); 65 $('body').toggleClass('main-navigation-active'); 66 }); 67 68 $(window).scroll(function() { 69 if ($(this).scrollTop() > 1) { 70 $('.menu-sticky #masthead').addClass('nav-shrink'); 71 } 72 else { 73 $('.menu-sticky #masthead').removeClass('nav-shrink'); 74 } 75 }); 76 77 dropdown_toggle.click(function() { 78 $(this).toggleClass('active'); 79 $(this).parent().find('.sub-menu').first().slideToggle(); 80 $('#primary-menu > li:last-child button.active').unbind('keydown'); 81 }); 82 83 84/* Match Height */ 85 86$('.post-item-wrapper').matchHeight(); 87$('.portfolio-slider article').matchHeight(); 88 89 90 91/* Keyboard Navigation */ 92 93if( $(window).width() < 1024 ) { 94 $('#primary-menu').find("li").last().bind( 'keydown', function(e) { 95 if( e.which === 9 ) { 96 e.preventDefault(); 97 $('#masthead').find('.menu-toggle').focus(); 98 } 99 }); 100 101 $('#primary-menu > li:last-child button:not(.active)').bind( 'keydown', function(e) { 102 if( e.which === 9 ) { 103 e.preventDefault(); 104 $('#masthead').find('.menu-toggle').focus(); 105 } 106 }); 107} 108else { 109 $('#primary-menu').find("li").unbind('keydown'); 110} 111 112$(window).resize(function() { 113 if( $(window).width() < 1024 ) { 114 $('#primary-menu').find("li").last().bind( 'keydown', function(e) { 115 if( e.which === 9 ) { 116 e.preventDefault(); 117 $('#masthead').find('.menu-toggle').focus(); 118 } 119 }); 120 121 $('#primary-menu > li:last-child button:not(.active)').bind( 'keydown', function(e) { 122 if( e.which === 9 ) { 123 e.preventDefault(); 124 $('#masthead').find('.menu-toggle').focus(); 125 } 126 }); 127 } 128 else { 129 $('#primary-menu').find("li").unbind('keydown'); 130 } 131}); 132 133 134});
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.