i'm using sticky.js and it's works well but when i resize browser like mobile view and click it main menu button goes up and i can't close it , i have to up to see it what should i do that it stick to top then show subsets ?

live demo

i use this jQuery

jQuery(document).ready(function(){
    jQuery("#header").sticky({
        className : 'sticky-header'
    });
});

if you need more detail please let me know

有帮助吗?

解决方案

In .sticky-header ul.slimmenu, change the styles to:

font-size:32px;
position:fixed;
top:50px;
box-shadow:none;

You want it to be 50px from top (so it doesn't overlap the menu bar) and fixed so it always stays there.

However, this should be put in a media query so it only applies to the mobile version. It will break the desktop version.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top