I am using jQuery to hide a div on my page:
$(document).ready(function(){
$('#message').hide();
When a certain part of the page scrolls into view the div shows using
$(window).scroll(function() {
var top = 0;
top = $(window).scrollTop();
if((top >= 1000) && (top < 2000)){
$('#message').fadeIn('slow');
}
}
I want to add a close button to this as follows
$('a#message-hide').click(function() {
$('#message').hide('fast');
return false;
All good so far but the part I cannot figure out is how to then STOP the div re-appearing when the user scrolls back to the trigger position on the page...?