waypoints
waypoints copied to clipboard
Progressive animation (scroll)
Hi,
Is there any way to do a progressive transition? Like for example this site: http://miramira.tv/ (title of the hero).
The only thing I have found is this: http://jsfiddle.net/z7E9u/1/ but I can't make it work.
Here is my code:
<script type="text/javascript">
var waypoint = new Waypoint({
element: document.getElementById('waypoint'),
handler: function(direction) {
if (direction === 'down') {
$('.intro').addClass('waypoint-intro');
}
else {
$('.intro').removeClass('waypoint-intro');
}
},
offset: -350
})
</script>
.waypoint-intro {
opacity: 0;
}
Thanks!
If you want to do the transition, then you also need to apply the css rule for it. The only thing your code doing right now is add / remove class.