Archived

This topic is now archived and is closed to further replies.

  • 0

Sticky Menu


Question

Posted · Report post

Hello all,

This could be a stretch, but i want to make my menu act like it does here: paychex.com. It sticks to the top of the browser when you scroll down. I want to add that functionality to my UberMenu here: test.discoveryoutsourcing.com

I found this code:


$isSticky=false;if($(this).scrollTop()>82){$("#wrapper>nav").not("[class='other']").addClass("stick");$isSticky=true}$(window).scroll(function(){if($(this).scrollTop()>82){if(!$isSticky){$("#wrapper>nav").not("[class='other']").addClass("stick");$isSticky=true}}else{$("#wrapper>nav").not("[class='other']").removeClass("stick");$isSticky=false}});

Could I use this if I correctly replace the id/class?

If this won't work, does anyone else have a possible solution?

Thanks,

Tim

Share this post


Link to post
Share on other sites

1 answer to this question