The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Menu stuck on top when scroll down

View previous topic View next topic Go down

Solved Menu stuck on top when scroll down

Post by Luffy on 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


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

Luffy
Manager
Manager

Male Posts : 4245
Reputation : 424
Language : Greek, English
Location : Greece

http://helpgr.forumgreek.com/forum

Back to top Go down

Solved Re: Menu stuck on top when scroll down

Post by Luffy on April 18th 2014, 3:07 pm

bump






Luffy
Manager
Manager

Male Posts : 4245
Reputation : 424
Language : Greek, English
Location : Greece

http://helpgr.forumgreek.com/forum

Back to top Go down

Solved Re: Menu stuck on top when scroll down

Post by J0k3R^ on 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^
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 on 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
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Menu stuck on top when scroll down

Post by Luffy on 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!






Luffy
Manager
Manager

Male Posts : 4245
Reputation : 424
Language : Greek, English
Location : Greece

http://helpgr.forumgreek.com/forum

Back to top Go down

Solved Re: Menu stuck on top when scroll down

Post by Ange Tuteur on 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
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

View previous topic View next topic Back to top


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