• Resolved wishmaster2013

    (@wishmaster2013)


    Hi, Thank you a lot for this wonderful theme! I have a question:

    I would like to have the sticky menu bar (top-nav) only to activate when scrolling i.e. when the header menu disappears (I have put a jquery mega menu in the header).

    An example site: www thedailystar net

    Is it possible to do that? Can you please help me or give me some advise.

    Thank you very much once again.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Meaning show the top-most navigation(sticky nav) when the scroll has crossed the header?

    Thread Starter wishmaster2013

    (@wishmaster2013)

    Yes. That means when the page is at the topmost position then there is no sticky nav – only the normal nav.

    I dont know if I understood that correctly but you can do it with some script and css

    jQuery(document).ready(function(){
    
        var stickyNav   = jQuery('#top_most-SupernovaSticky-wrapper');
        var hNavPos   = jQuery('#nav_wrapper').offset().top;   
    
        jQuery(window).scroll(function(){
            if(jQuery(this).scrollTop() > hNavPos){
                stickyNav.fadeIn();
            }else{
                stickyNav.fadeOut();
            }
        });
    });

    Some css

    #top_most-SupernovaSticky-wrapper{display: none;}

    Thread Starter wishmaster2013

    (@wishmaster2013)

    Thank you. I will try this.

    What I meant is that if I enable both ‘topmost nav’ and ‘main nav’, then at the un-scrolled state (when one just visits the site) both the navigations are visible.

    I was trying to make the ‘topmost nav’ only visible when an user scrolls down past the ‘main nav’ section.

    I understand at this point I am asking some very simple questions, but I am very new to wordpress web design.

    Thank you for understanding.

    yes that’s what the script is for.

    Thread Starter wishmaster2013

    (@wishmaster2013)

    O wow… its working. Thanks for the help. If I may, can I request two more questions:

    1. How to change the font color of the topmost menu buttons.
    2. Is it possible to replace the fadeOut with something that means ‘do not show’?

    However, thanks a lot, for the lovely theme.

    yes.

    1) #top_nav li a {color: red}

    2) Use hide() and show() in place of fadeOut() and fadeIn()

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Sticky top-nav activate only during scrolling’ is closed to new replies.