waypoints icon indicating copy to clipboard operation
waypoints copied to clipboard

Progressive animation (scroll)

Open isoriaizquierdo opened this issue 8 years ago • 1 comments

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!

isoriaizquierdo avatar Nov 04 '16 18:11 isoriaizquierdo

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.

yellow1912 avatar Dec 01 '16 12:12 yellow1912