I have a scrollable div with and arrow above and an arrow below. What I am trying to do is to make the arrow above appear after the div has reached a certain height.
here is the code that I have...
$("#scrolldivup").hide();
$(.section).scroll(function(){
if($(.section).scrollTop()>1){
$("#scrolldivup").fadeIn();
}
else
{
$("#scrolldivup").fadeOut();
}
});
".section" is the scrollable div So as soon as it scrolls more than 1 pixel I want the "#scrolldivup" to appear which by the way is an anchor tag.
Can anyone see how my code is wrong?