I have a fixed header on my site that I’d like to fade in the background opacity from 0% to 100% once the user scrolls past the first strip of content (our hero image). My javascript skills are non-existent - but I scrambled together something that I thought might work, but no dice.
Here’s what I managed so far…
$w.onready(function () {
if wixWindow.scrollTo(0, 500) || $w(‘#rrheader’).style.opacity = ‘0’
}
else {
$w(“#rrheader”).style.opacity = ‘1’;
}
});
Any help would be much appreciated.