Solon Sticky Menu


#1

Hello!
Is there a possibility of making the main menu sticky in the Solon theme?

Kind regards,
Timon


#2

Hi there,

You need to add javascript code and CSS code to do that.
– Javascript:
Add these custom code using Custom Javascript plugin

jQuery(window).scroll(function (event) {
	var scroll = jQuery(window).scrollTop();
	if(scroll > 210){
		jQuery('#site-navigation').addClass('header-scrolled');
    }else{
		jQuery('#site-navigation').removeClass('header-scrolled');
	}
})

– CSS
Add these CSS code into: Customize > additional CSS

.main-navigation.header-scrolled {
    position: fixed;
    top: 30px;
}

Regards,
Awan


Make menu bar sticky (always visible?)
#3

Thank you!

Regards,
Timon