1jQuery(window).on('load', function() { 2 jQuery('#status').fadeOut(); 3 jQuery('#preloader').delay(350).fadeOut('slow'); 4 jQuery('body').delay(350).css({'overflow':'visible'}); 5}) 6 7// sticky header 8jQuery(window).scroll(function(){ 9 if (jQuery(window).scrollTop() >= 100) { 10 jQuery('.is-sticky-on').addClass('sticky-head'); 11 } 12 else { 13 jQuery('.is-sticky-on').removeClass('sticky-head'); 14 } 15}); 16 17jQuery(function($){ 18 $( '.toggle-nav button' ).click( function(e){ 19 $( 'body' ).toggleClass( 'show-main-menu' ); 20 var element = $( '.sidenav' ); 21 building_contractor_trapFocus( element ); 22 }); 23 24 $( '.close-button' ).click( function(e){ 25 $( '.toggle-nav button' ).click(); 26 $( '.toggle-nav button' ).focus(); 27 }); 28 $( document ).on( 'keyup',function(evt) { 29 if ( $( 'body' ).hasClass( 'show-main-menu' ) && evt.keyCode == 27 ) { 30 $( '.toggle-nav button' ).click(); 31 $( '.toggle-nav button' ).focus(); 32 } 33 }); 34}); 35 36function building_contractor_trapFocus( element, namespace ) { 37 var building_contractor_focusableEls = element.find( 'a, button' ); 38 var building_contractor_firstFocusableEl = building_contractor_focusableEls[0]; 39 var building_contractor_lastFocusableEl = building_contractor_focusableEls[building_contractor_focusableEls.length - 1]; 40 var KEYCODE_TAB = 9; 41
42 building_contractor_firstFocusableEl.focus(); 43 44 element.keydown( function(e) { 45 var isTabPressed = ( e.key === 'Tab' || e.keyCode === KEYCODE_TAB ); 46 47 if ( !isTabPressed ) { 48 return; 49 } 50 51 if ( e.shiftKey ) /* shift + tab */ { 52 if ( document.activeElement === building_contractor_firstFocusableEl ) { 53 building_contractor_lastFocusableEl.focus(); 54 e.preventDefault(); 55 } 56 } else /* tab */ { 57 if ( document.activeElement === building_contractor_lastFocusableEl ) { 58 building_contractor_firstFocusableEl.focus(); 59 e.preventDefault(); 60 } 61 } 62 }); 63} 64 65jQuery(document).ready(function() { 66 jQuery('.owl-carousel').owlCarousel({ 67 loop: true, 68 margin: 0, 69 nav:false, 70 dots:true, 71 rtl:false, 72 items: 1, 73 autoplay:false, 74 }) 75}); 76 77/* =============================================== 78 SCROLL TOP 79============================================= */ 80 81jQuery(document).ready(function () { 82 jQuery(window).scroll(function () { 83 if (jQuery(this).scrollTop() > 0) { 84 jQuery('#button').fadeIn(); 85 } else { 86 jQuery('#button').fadeOut(); 87 } 88 }); 89 jQuery('#button').click(function () { 90 jQuery("html, body").animate({ 91 scrollTop: 0 92 }, 600); 93 return false; 94 }); 95});
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.