Parallax Menu

Good Morning,

I have setup a parallax site on idrury.co.uk however I am having issues with the menu. The .x-navbar is not working correctly with the parallax site until I scroll & the .x-navbar-fixed-top class is added when it will highlight the “Home” button.

Is there a way I can do this when the page loads so the first section “Home” is highlighted & no need to scroll before it then highlights? Cheers

(Page Load apperrance)

(x-navbar-fixed-top class is added)

Hello Philip,

Please add this code in the Global JS:

jQuery(function($){

	$('.home .x-navbar .desktop .x-nav>li:first-child').addClass('current-menu-item');

	$(window).scroll(function(){

		if( $(this).scrollTop() == 0 ) {
			$('.home .x-navbar .desktop .x-nav>li:first-child a span').css('color', 'rgb(255,0,0)');
		}

	});

});

Kindly note that since this is a custom code that changes the default behavior/display of the theme, you will be responsible to maintain or update the code in case you require further changes or if the code stops working in future updates. If you are uncertain how to proceed, it would be best to get in touch with a developer.

Hope this helps.

Thanks @Jade that worked a treat. Appreicate your help :slight_smile:

You’re most welcome, Philip. :slight_smile:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.