HEX
Server: Apache/2
System: Linux ws03 5.14.0-570.44.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Sep 17 10:32:11 EDT 2025 x86_64
User: keesdewit (1017)
PHP: 8.3.30
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/keesdewit/public_html/wp-content/themes/enfold/js/avia-snippet-sidebarmenu.js
(function($)
{
    "use strict";

    $( function()
    {
		// set sidebar main menu option
        avia_sidebar_menu();
    });


	function avia_sidebar_menu()
	{
		var win				= $(window),
			main			= $('#main'),
			sb_header		= $('.html_header_sidebar #header_main'),
            sidebar			= $('.html_header_sidebar #header.av_conditional_sticky');

        if( ! sb_header.length )
		{
			return;
		}
        // main.css({"min-height":sb_header.outerHeight()});

        if( ! sidebar.length )
		{
			return;
		}

        var innerSidebar	= $('#header_main'),
       	 	wrap			= $('#wrap_all'),
       	 	fixed_frame		= parseInt( $('.av-frame-top').height(), 10 ) * 2 || 0,
       	 	subtract 		= parseInt($('html').css('margin-top'), 10),
            calc_values 	= function()
            {
            	if( innerSidebar.outerHeight() + fixed_frame < win.height() )
				{
					sidebar.addClass('av_always_sticky');
				}
				else
				{
					sidebar.removeClass('av_always_sticky');
				}

				wrap.css({'min-height': win.height() - subtract});
            };

        calc_values();

        win.on( "debouncedresize av-height-change", calc_values );
	}

})(jQuery);