Fade only top part of div out as it reaches fixed navigation
I'm trying to fade the top part of my content as it reaches a fixed nav bar with a translucent background. I've got it somewhat working, but you'll see 2 problems: All the content fades out, not just what's approaching the fixed nav. Content should fade at a line by line rate. All the content for all the other divs fade about because of the selector class. I'd appreciate any help! Thanks var divs = $('.section').children(); $(window).on('scroll', function() { var st = $(this).scrollTop(); divs.css({ 'opacity' : (1 - st/20) }); }); JS Fiddle so far: http://jsfiddle.net/x5JKC/ I changed a bit