Looking for some guidance on jQuery assistance. I currently have a fixed navigation bar at the top of my webpage with an initial opacity set to 0 upon page load. As the user scrolls down, I want the navigation bar to fade in using the following code:
function EasyPeasyParallax() {
scrollPos = $(this).scrollTop();
$('#nav').css({
'opacity': 0+(scrollPos/800)
});
});
Is there a way to prevent the navigation bar from fading out when the user scrolls back up?
I attempted using an if statement but my jQuery skills are limited.
Appreciate any help. Edd Neal.