An element is not hidden until you explicitly set it visibity : hidden. He just scrolled down. For your task you can use the jquery plugin . It works like a charm. After setting, just do -
$('.hello').appear(function() {
$('.world').css({'background':'your-background'});
});
You can also use the fade function if you want.
$('someselector').on('disappear', function(event, $all_disappeared_elements) {
});
source
share