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.

Menu stuck on top when scroll down

3 posters

Go down

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 : 6897
Reputation : 794
Language : Greek, English

https://forumote.forumotion.com

Back to top Go down

Solved Re: Menu stuck on top when scroll down

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

bump
TheCrow
TheCrow
Manager
Manager

Male Posts : 6897
Reputation : 794
Language : Greek, English

https://forumote.forumotion.com

Back to top Go down

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
J0k3R^
J0k3R^
Forumember

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

http://fmplanet.forumgreek.com

Back to top Go down

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.
Ange Tuteur
Ange Tuteur
Forumaster

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

https://fmdesign.forumotion.com

Back to top Go down

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!
TheCrow
TheCrow
Manager
Manager

Male Posts : 6897
Reputation : 794
Language : Greek, English

https://forumote.forumotion.com

Back to top Go down

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
Ange Tuteur
Ange Tuteur
Forumaster

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

https://fmdesign.forumotion.com

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum