I have managed to hide the element when you scroll all the way up but i am having problems to hide it when you scroll down to bottom of the page.I have two span elements that hold images of uparrow.png and downarrow.png.I want my downarrow span to disappear when you reach the bottom of the page and else it is visible.Here is my code:
#uparrow{position:fixed;top:20px;left:50px;}
#downarrow{position:fixed;bottom:20px;left:50px}
$(document).ready(function(){
var top=0;
$(window).scroll(function(){
var st=$(this).scrollTop();
if(st==top){
$("#uparrow").css("display","none");
}else{
$("#uparrow").css("display","block");
}
});
});