Henri Koivuneva | 7709300 | 2017-11-22 21:22:57 +0200 | [diff] [blame^] | 1 | // this thing is js driven on slid.es so I didn't bother switching out for css animations |
2 | var duration = 7000, steps = 3, step = 1; | ||||
3 | |||||
4 | setInterval( function() { | ||||
5 | document.querySelector( '.animation' ).setAttribute( 'data-animation-step', step = ++step > steps ? 1 : step ); | ||||
6 | }, duration / steps ); |