Fade Out A Div When Scroller Hits Bottom Of Another Div
This question sort of relates to this one: Append div to body when URL hash # changes I'm using Curtain.js and currently I have a fixed div that pops up when the hash changes. I.E
Solution 1:
you can use window.height()
which returns the height of the browser's viewport:
var vp = $(window).height(); // height of the browser's viewport
var divs = $('.nav-wrap');
$(window).scroll(function(){
if($(window).scrollTop() < vp){
divs.fadeOut("slow");
} else {
divs.fadeIn("slow");
}
});
Post a Comment for "Fade Out A Div When Scroller Hits Bottom Of Another Div"