| Server IP : 216.250.13.251 / Your IP : 216.73.216.164 Web Server : nginx/1.24.0 System : Linux gunay 6.8.0-134-generic #134-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 26 18:43:11 UTC 2026 x86_64 User : root ( 0) PHP Version : 7.4.33 Disable Function : 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, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/gunay/wp-content/themes/rttheme19/js/app/layout4/ |
Upload File : |
/* *******************************************************************************
STICKY HEADER
********************************************************************************** */
if( ! $.fn.rt_sticky_header ){
$.fn.rt_sticky_header = function()
{
if( $(this).length == 0 ){
return;
}
var header = $(this),
header_height = header.outerHeight(),
body = $("body"),
main_content = $("#main_content"),
wp_admin_bar_height = $("#wpadminbar").outerHeight(),
header_top_position = header.position().top,
top_distance = ( header.position().top - header_height ) + (header_height+70) ;
if( header.length > 0 ){
//scroll function
$(window).scroll(function(event) {
if( $.fn.is_mobile_menu() ){
return;
}
var y = $(window).scrollTop();
if( y < 0 ){
return;
}
if( y < top_distance ){
header.removeClass( "stuck" );
main_content.css({"margin-top":""});
}
if( y > top_distance && y < top_distance + 300 ){
if( header.hasClass("stuck") ) {
return;
}
header.addClass( "stuck" );
if( ! body.hasClass("overlapped-header") ){
main_content.css({"margin-top":header_height});
}
if( ! body.hasClass("header-stuck-before") ){
body.addClass("header-stuck-before");
}
}
});
}
};
}
$(window).on('window_width_resize load', function() {
$(".sticky.top-header").rt_sticky_header();
});