The forum of the forums

Would you like to react to this message? Create an account in a few clicks or log in to continue.
The forum of the forums
3 posters

    Menu stuck on top when scroll down

    TheCrow
    TheCrow
    Manager
    Manager


    Male Posts : 6916
    Reputation : 795
    Language : Greek, English

    Solved Menu stuck on top when scroll down

    Post by TheCrow April 17th 2014, 1:47 pm

    Hello. I want the menu bar, when you scroll down, as soon as you pass the menu bar, to stuck up on the top.

    This is the menu bar
    Menu stuck on top when scroll down LpsQPRj

    As soon as you pass it when you scroll down to stuck on the top. Can this happen?
    TheCrow
    TheCrow
    Manager
    Manager


    Male Posts : 6916
    Reputation : 795
    Language : Greek, English

    Solved Re: Menu stuck on top when scroll down

    Post by TheCrow April 18th 2014, 3:07 pm

    bump



    Menu stuck on top when scroll down Thecro10
     Forum of the Forums

    Forumotion Rules | Tips & Tricks |
    FAQ | Did you forget your password?



    *** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
    No support via PM!
    J0k3R^
    J0k3R^
    Forumember


    Male Posts : 742
    Reputation : 28
    Language : Greek > English > Russian > Spanish
    Location : C:\>r00t

    Solved Re: Menu stuck on top when scroll down

    Post by J0k3R^ April 18th 2014, 3:35 pm

    βρε τον Μαριο.. Very Happy
    σε πετυχαινω μετα απο πολυ καιρο.
    ωραιο φορουμ εχεις φτιαξει.


    Hey buddy, here are some codes for that nav bar u talking about: Wink

    css 

    Code:
    Codes Removed



    templates → overall_header
    when u find
    Code:
    <!-- END switch_desc -->
    and
    Code:
    <!-- BEGIN switch_ticker_new -->

    make it:
    Code:
    Codes Removed

    Tell me if that works, im using punbb aswell Wink


    Last edited by J0k3R^ on April 19th 2014, 10:37 am; edited 1 time in total
    Ange Tuteur
    Ange Tuteur
    Forumaster


    Male Posts : 13207
    Reputation : 3000
    Language : English & 日本語
    Location : Pennsylvania

    Solved Re: Menu stuck on top when scroll down

    Post by Ange Tuteur April 18th 2014, 6:52 pm

    Hello Marios,

    Try this :
    Modules > Javascript codes management > create a new script

    Title : what you wish
    Placement : in all the pages
    Paste the code below and save :
    Code:
    $(function() {
     Â   var scrollNav = function() {
     Â       var scroll = $(window).scrollTop();
     Â       if (scroll >= 220) $('#primary_nav').attr('style','position:fixed;top:0px;left:0;right:0;z-index:20000;');
     Â       if (scroll < 220) $('#primary_nav').removeAttr('style');
     Â   };
     Â   
     Â   scrollNav();
     Â   $(window).scroll(function() { scrollNav() });
    });

    Adjust 220 to change the amount of scrolling it takes until the nav is fixed.
    TheCrow
    TheCrow
    Manager
    Manager


    Male Posts : 6916
    Reputation : 795
    Language : Greek, English

    Solved Re: Menu stuck on top when scroll down

    Post by TheCrow April 19th 2014, 10:10 am

    Hello JokeR^. Unfortunately, your code did not work as wanted.
    Hello Ange. Thanks for the code works fine! Topic solced!



    Menu stuck on top when scroll down Thecro10
     Forum of the Forums

    Forumotion Rules | Tips & Tricks |
    FAQ | Did you forget your password?



    *** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
    No support via PM!
    Ange Tuteur
    Ange Tuteur
    Forumaster


    Male Posts : 13207
    Reputation : 3000
    Language : English & 日本語
    Location : Pennsylvania

    Solved Re: Menu stuck on top when scroll down

    Post by Ange Tuteur April 19th 2014, 6:07 pm

    You're welcome I love you

    If you ever need one that works along with the FA toolbar let me know. Wink

    Topic solved and archived

      Current date/time is November 11th 2024, 10:31 pm