• Hi, I want to keep the Header on top(which i don’t want to be fixed) and the navigation menu below the header which should be fixed on scrolling.

    How do I achieve this in the current theme ?

Viewing 1 replies (of 1 total)
  • Theme Author Afterimage Designs

    (@afterimagedesigns)

    Hi @codeforweb, sorry for the late response, I am not sure what exactly you want to do but maybe this code may help.

    JS Code:

    jQuery(function($){
      $(window).scroll(function(){
         var sticky = $('#masthead'),
            scroll = $(window).scrollTop();
    
        if (scroll >= 100) sticky.addClass('fixed');
        else sticky.removeClass('fixed');
      });
      
    });

    CSS Code:

    .fixed {
        position: fixed;
        top:0; left:0;
        width: 100%; 
        z-index: 99;
    }
Viewing 1 replies (of 1 total)

The topic ‘Non-Fixed Header and Fixed navigation menu’ is closed to new replies.