I want to make the menu stay fixed after some scrolling,
<script>
$("document").ready(function($){
var nav = $('.menu-topo');
$(window).scroll(function () {
if ($(this).scrollTop() > 150) {
nav.addClass("fixo");
} else {
nav.removeClass("fixo");
}
});
});
</script>
and html
<div id="menu-topo">asdasdasd</div>
It's not getting fixed. What's wrong?