1(function($){ 2 3 /** 4 * Home Page Banner 5 * 6 * @class HomePageBanner 7 * @since 1.0 8 */ 9 HomePageBanner = { 10 11 /** 12 * Initializes a Home Page Banner. 13 * 14 * @since 1.0 15 * @method init 16 */ 17 init: function() 18 { 19 // Init Full Screen height. 20 HomePageBanner._initFullScreenHeight(); 21 }, 22 23 /** 24 * Fires when the Banner full screen selected. 25 * 26 * @since 1.0.0 27 * @access private 28 * @method _initFullScreenHeight 29 */ 30 _initFullScreenHeight: function() 31 { 32 // Set up the resize timer 33 var ResizeTime, 34 win = $(window); 35 36 if ( $('.ast-full-home-page-banner')[0] ) { 37 // Initiate full window height on resize 38 HomePageBanner._homePageFullBanner(); 39 40 var width = win.width(); 41 win.resize(function() { 42 if(win.width() != width){ 43 clearTimeout(ResizeTime); 44 ResizeTime = setTimeout(HomePageBanner._homePageFullBanner, 200); 45 width = win.width(); 46 } 47 }); 48 49 win.on( "orientationchange", function( event ) { 50 if(win.width() != width){ 51 clearTimeout(ResizeTime); 52 ResizeTime = setTimeout(HomePageBanner._homePageFullBanner, 200); 53 width = win.width(); 54 } 55 }); 56 } 57 }, 58 /** 59 * Fires when the Home Page Banner full screen selected. 60 * 61 * @since 1.0.0 62 * @access private 63 * @method _homePageFullBanner 64 */ 65 _homePageFullBanner: function() 66 { 67 // If we're not using a full screen element, bail. 68 if ( ! $( '.ast-full-home-page-banner' ).length ) 69 return; 70 71 // Set up some variables 72 var window_height = $( window ).height(); 73 74 // Get any space above our page header 75 var offset = $(".ast-full-home-page-banner").offset().top; 76 77 // Apply the height to our div 78 $( '.ast-full-home-page-banner' ).css( 'height', window_height - offset + 'px' ); 79 80 }, 81 } 82 83 /* Initializes the Astra Advanced Headers. */ 84 $(function(){ 85 HomePageBanner.init(); 86 }); 87 88})(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.