Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if( $('.onepage-pagination li').length > 1 ){
- var steps = $('.onepage-pagination li').length;
- //console.log( 'steps', steps );
- var i = 2;
- var autoplay = setInterval(function(){}, 4000);
- autoplay = setInterval(function(){
- $('[data-index="'+i+'"]').click();
- //console.log( 'step click', i );
- if(i == 5){
- i = 1
- }else{
- i++
- }
- }, 7000);
- $(document).bind('mousewheel DOMMouseScroll touchstart', function(event) {
- clearInterval(autoplay);
- console.log( 'slide stopped');
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement