Decrease size menu when scrolling

Hi,

Would someone have a way to decrease the menu and its content when the user scroll down ?
I tried some things in the themes options in javascript but no success.

window.onscroll = function() {scrollFunction()};
function scrollFunction() {
if (document.body.scrollTop > 80 || document.documentElement.scrollTop > 80) {
document.getElementsByClassName(“x-navbar-wrap”).style.height = “50px”;
document.getElementsByClassName(“x-brand.img”).style.fontSize = “25px”;
} else {
document.getElementsByClassName(“x-navbar-wrap”).style.height = “150px”;
document.getElementsByClassName(“x-brand.img”).style.fontSize = “35px”;
}
}

Thank you.

Hi @Blodarn,

Thank you for writing in, is that the site you’re working on below? It seems to have a fixed left menu and using Superfly, please clarify because we can not provide support for 3rd party plugins and customazations.

On the Cornerstone’s Header Builder, the bar has a shrink option if it’s set to sticky.

Cheers!

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