F
F
ferles222018-05-15 22:22:49
Layout
ferles22, 2018-05-15 22:22:49

How to implement navigation and logo attached to the screen?

Hello everyone, tell me how to make the logo and navigation menu be attached only from 2 or more screens, and not displayed on the first one, in the landing, as implemented here:
https://posadisvoederevo.ru/

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dymok, 2018-05-15
@UnluckySerivelha

jQuery:

$(window).scroll(function() {
    var top = $(document).scrollTop();
    if (top < 300) $(".top_nav").removeClass('fixed');
    else $(".top_nav").addClass('fixed');
});

CSS:
.fixed{
  position: fixed;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question