1/** 2 * Custom JS Functionality 3 * 4 */ 5( function( $ ) { 6 7 jQuery( document ).ready( function() { 8 9 // Add button to sub-menu item to show nested pages / Only used on mobile 10 $( '.main-navigation li.page_item_has_children, .main-navigation li.menu-item-has-children' ).prepend( '<button class="menu-dropdown-btn"><i class="fas fa-angle-down"></i></button>' ); 11 $( '.main-navigation, .avant-header-nav' ).find( 'a' ).on( 'focus blur', function() { 12 $( this ).parents( 'li' ).toggleClass( 'focus' ); 13 } ); 14 15 // Mobile nav button functionality 16 $( '.menu-dropdown-btn' ).bind( 'click', function() { 17 $(this).parent().toggleClass( 'open-page-item' ); 18 }); 19 // The menu button 20 $( '.header-menu-button' ).click( function(e){ 21 $( 'body' ).toggleClass( 'show-main-menu' ); 22 }); 23 24 $( '.main-menu-close' ).click( function(e){ 25 $( '.header-menu-button' ).click(); 26 }); 27 28 // Show / Hide Search 29 $( '.menu-search' ).toggle( function(){ 30 $( 'body').addClass( 'show-site-search' ); 31 $( '.search-block input.search-field' ).focus(); 32 },function(){ 33 $( 'body').removeClass( 'show-site-search' ); 34 }); 35 36 // Scroll To Top Button Functionality 37 $(".scroll-to-top").bind("click", function() { 38 $('html, body').animate( { scrollTop: 0 }, 800 ); 39 }); 40 $(window).scroll(function(){ 41 if ($(this).scrollTop() > 400) { 42 $('.scroll-to-top').fadeIn(); 43 } else { 44 $('.scroll-to-top').fadeOut(); 45 } 46 }); 47 48 }); 49 50 $(window).resize(function () { 51 52 if ( $( window ).width() > 980 ) { 53 $( 'body' ).removeClass( 'show-main-menu' ); 54 } 55 56 }); 57 58 $(window).load(function() { 59 $( '.side-aligned-social' ).removeClass( 'hide-side-social' ); 60 }); 61 62 // Hide Search if user clicks anywhere else 63 $( document ).mouseup( function (e) { 64 var container = $( '.search-block' ); 65 if ( !container.is( e.target ) && container.has( e.target ).length === 0 ) { 66 $( 'body' ).removeClass( 'show-site-search' ); 67 } 68 }); 69 70} )( jQuery );
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.