Making Nav Div Appear When Scrolling Down

aa26i

New Member
I want a div to appear at the top when user scroll down pass a div class called \[code\].header1\[/code\] (This div has 3 other div inside)I want the nav to appear in that \[code\].fixedDiv\[/code\]. I found my answer here, but I have not been able to implement it on my site. Here is what I got\[code\]<script type="text/javascript"> var startY = $('.header1').position().top + $('.header1').outerHeight(); $(window).scroll(function () { if( $(this).scrollTop() > startY ){ $('.fixedDiv').slideDown(); }else{ $('.fixedDiv').slideUp(); } });</script>\[/code\]And I have a div called \[code\].fixedDiv\[/code\] on my site saying topnav, my problem is the div is always there. It doesn't hide or appear when scrolling down.This is a link to my website.For css I have nothing setup for \[code\].header1\[/code\] because other div are inside and they should be the height needed for \[code\].fixedDiv\[/code\] to appear. And \[code\].fixedDiv\[/code\] has css \[code\].fixedDiv { position:fixed; top:0px; left:0px; background:orange;}\[/code\]I know I'm close to getting this working but I just can't seem to figure out what I'm missing.
 
Back
Top