Y
Y
Yuki Developer2016-03-20 17:29:11
css
Yuki Developer, 2016-03-20 17:29:11

How to make fadeOut only fixed header and not static?

Here is the code

$(".navbar").removeClass("fixed");
  $(window).scroll(function(){
    if($(this).scrollTop() > 120){
      $(".navbar").addClass("fixed").fadeIn(500);
      $(".btn-header").addClass("hidden-lg hidden-md hidden-sm");
      $(".nav-btn").removeClass("hidden")
    }
    else {
      $(".navbar").removeClass("fixed").fadeOut(500);
      $(".nav-btn").addClass("hidden")
    }
  });

Along with the fixed menu, when 120px is reached, the permanent menu also disappears. how to avoid it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Oleg, 2016-03-20
@werty1001

$(".navbar").removeClass("fixed").hide().fadeIn(250);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question