PK œqhYî¶J‚ßFßF)nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/ $#$#$#

Dir : /home/trave494/elintscleaningservices.co.uk/wp-content/themes/porto/js/
Server: Linux ngx353.inmotionhosting.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64
IP: 209.182.202.254
Choose File :

Url:
Dir : /home/trave494/elintscleaningservices.co.uk/wp-content/themes/porto/js/sticky-icon-bar.js

// Porto Sticky icon bar on mobile
( function( theme, $ ) {
	'use strict';

	var $header_main = $( '#header .header-main' );
	var $menu_wrap = $( '#header .main-menu-wrap' );
	if ( $( '.porto-sticky-navbar' ).length > 0 ) {
		window.addEventListener( 'scroll', function() {
			if ( window.innerWidth < 576 ) {
				var headerOffset = -1;
				var scrollTop = $( window ).scrollTop();

				if ( $header_main.length ) {
					headerOffset = Math.max( $header_main.scrollTop() + $header_main.height(), headerOffset );
				}
				if ( $menu_wrap.length ) {
					headerOffset = Math.max( $menu_wrap.scrollTop() + $menu_wrap.height(), headerOffset );
				}
				if ( headerOffset <= 0 ) {
					if ( $( '#header' ).length > 0 && $( '#header' ).height() > 10 ) headerOffset = $( '#header' ).scrollTop() + $( '#header' ).height();
					else headerOffset = 100;
				}
				if ( headerOffset <= scrollTop ) {
					$( '.porto-sticky-navbar' ).addClass( 'fixed' );
				} else {
					$( '.porto-sticky-navbar' ).removeClass( 'fixed' );
				}
			}
		}, { passive: true } );
	}
} )( window.theme, jQuery );