HEX
Server: Apache/2
System: Linux da.abacipark.com 4.18.0-553.34.1.el8_10.x86_64 #1 SMP Wed Jan 8 09:40:06 EST 2025 x86_64
User: ankarasy (1626)
PHP: 8.4.18
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: /home/ankarasy/public_html/wp-content/themes/alomaliye4/includes/js/enable-sticky-header.js
/**
 * Theme Enable Sticky Navigation
 * @author Pitabas Behera
 */
jQuery(document).ready(function() {
    function ascentStickyHeader() {
        if (jQuery(window).scrollTop() >= origOffsetY) {
            jQuery('#header-main').addClass('sticky');
            jQuery('#header-main.sticky').css({
                'top': adminbarHeight + 'px'
            });

            var headerSearchFormTopPosition = (adminbarHeight) + (jQuery('.header-bottom').outerHeight());
            jQuery('#header-search-form-wrap').addClass('sticky');
            jQuery('#header-search-form-wrap.sticky').css({
                'top': headerSearchFormTopPosition + 'px'
            });
        } else {
            jQuery('#header-main').removeClass('sticky');
            jQuery('#header-main').css({
                'top': 'auto'
            });
            jQuery('#header-search-form-wrap').removeClass('sticky');
        }
    }

    function wpAdminbarHeight(wpAdminbar) {
        if (jQuery(wpAdminbar).length) {
            var adminbarHeight = jQuery(wpAdminbar).outerHeight(true);
        } else {
            var adminbarHeight = 0;
        }
        return adminbarHeight;
    }
    jQuery(window).on("load resize scroll", function(e) {
        adminbarHeight = wpAdminbarHeight("#wpadminbar");
        if(jQuery(window).innerWidth() > 767) {
            jQuery('#header-main.sticky').css({
                'top': adminbarHeight + 'px'
            });
        } else {
            jQuery('#header-main.sticky').css({
                'top': 0
            });
        }

        var headerSearchFormTopPosition = (adminbarHeight) + (jQuery('.header-bottom').outerHeight());
        jQuery('#header-search-form-wrap.sticky').css({
            'top': headerSearchFormTopPosition + 'px'
        });
    });
    adminbarHeight = wpAdminbarHeight("#wpadminbar");
    var stickyMenu = jQuery('#header-main');
    var origOffsetY = (stickyMenu.offset().top) - (adminbarHeight);
    document.onscroll = ascentStickyHeader;

}); //End jQuery