jQuery Waypoint: FadeIn - FadeOut effect on scroll
I'm trying to create a fadeIn and fadeOut effect with elements on scroll.
I'm told this can be done with WayPoint. I've tried a variety of things,
but nothing seems to work, no fade in, no fade out, and no errors in the
console. Here is what I'm currently using:
<script type='text/javascript'>
$(window).load(function(){
$("#top-section").waypoint(function(){
$(this).fadeIn('slow');
},{
offset: 'bottom-in-view'
});
$(this).fadeOut('slow');
},{
offset: 'top-in-view'
});
});
</script>
No comments:
Post a Comment