Answer the question
In order to leave comments, you need to log in
I correctly laid out a fixed menu and in general the weight of the project?
1 Help how to remove the vertical scroll?
2 I couldn't use this code for my project(
var $navFix = $(".meny");
$(window).scroll(function(){
if ( $(this).scrollTop() > 120){ // 120 это высота прокрутки
$navFix.addClass("fixed");
} else if($(this).scrollTop() <= 120) {
$navFix.removeClass("fixed");
}
});
Answer the question
In order to leave comments, you need to log in
There is nothing to evaluate there, since there is nothing stupidly there.
As for the menu, it's not at all clear why JS was needed there.
If the menu is ALWAYS fixed at the top?
The usual one position: fixed;
is enough without any JS.
This is a comment on a previous question.
"Gags" when scrolling through sections just kill.
Instead of inventing a bicycle, it was easier to use a ready-madefullPage.js
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question