I'm using twitter-bootstrap on my page and I have a video background. It looks like this https://jsfiddle.net/Leytgm3L/41/ . When user scrolls down, the black section starts to appear and first its opacity is set to 0, but when user continue scrolling - it changes to 1 when he reach end of this section. I want to change that, so the section will have the opacity set to 1 when it fully appears on the screen, so the user will see the black background of this component when it's fully visible on the page. So this is not good: https://i.stack.imgur.com/uOEKo.png , but something like this one is: https://i.stack.imgur.com/4qqMb.jpg I tried to go with:
$("#black").css("opacity",$("body").scrollTop()/1000);
but it didn't work. Can you help me with that?