HEX
Server: Apache/2.4.65 (Debian)
System: Linux web6 5.10.0-36-amd64 #1 SMP Debian 5.10.244-1 (2025-09-29) x86_64
User: innocamp (1028)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /home/sabre/public_html/wp-content/plugins/sticky-header-oceanwp/main.js
jQuery(document).ready(function($){
    
    var orginal_height = typeof(orginal_height==='undefined') || $('body').hasClass('fixed_sticky_active')==false ? $('#site-logo-inner').height() : orginal_height;

	function sticky_header_oceanwp(){		
	    
	    var style = typeof(sticky_header_style) !== 'undefined' && sticky_header_style == 'shrink' ? 'shrink' : 'float';
		var site_header = $('#site-header');
		var wpadmin_height = $('#wpadminbar').css('position') == 'fixed' && $('#wpadminbar').height() > 0 ? $('#wpadminbar').height() : 0;
		var top_bars = $('#wpadminbar').css('position') == 'fixed' ? $('#top-bar-wrap').height() : $('#top-bar-wrap').height() + $('#wpadminbar').height();
		if (Number.isNaN(top_bars)){
			top_bars = $('#top-bar-wrap').height();
		}
		top_bars = top_bars || 0;
		var header_status = $(window).scrollTop() >= top_bars;
		var header_padding = site_header.height();
		
		if (style == 'float'){
			
			if (!header_status){
				site_header.css({
					'position': 'relative',
					'top': '0',
				});
				site_header.next().css('margin-top', '0');
			}else{
				site_header.css({
					'position': 'fixed',
					'top': wpadmin_height,
					'width': '100%',
					'z-index': '998',
				});
				site_header.next().css('margin-top', header_padding);
			}	
	    }
	    
	    if (style == 'shrink'){
	        
    		if (!header_status){
    			site_header.css({
    				'position': 'relative',
    				'top': '0',
    			});
                $('body').removeClass('fixed_sticky_active');
    			site_header.next().css('margin-top', '0');
    		}else{
    			site_header.css({
    				'position': 'fixed',
    				'top': wpadmin_height,
    				'width': '100%',
    				'z-index': '998',
    			});
    			site_header.next().css('margin-top', header_padding);
                $('body').addClass('fixed_sticky_active');
    		}	
	    }
	    
	}
	
	$(window).resize(function(){
	    $('body').removeClass('fixed_sticky_active');
	    sticky_header_oceanwp();
	});
		
    $(window).scroll(function(){
        sticky_header_oceanwp();
    });
	
	sticky_header_oceanwp();

	
});