hmongouachon / rgbKineticSlider

A fully customizable webgl slider based on PixiJs and Gsap
348 stars 40 forks source link

Autoplay and random play #1

Open Mexikaner9 opened 4 years ago

Mexikaner9 commented 4 years ago

Congratulations! Great job! Autoplay and random play would be great

Anunnaki26 commented 4 years ago

Yes, please add auto play and random play feature and sell it on https://codecanyon.net/category/javascript

hmongouachon commented 3 years ago

Thanks ! I'll will keep that in mind in case I release a new update.

Anunnaki26 commented 2 years ago

Please add at least the autoplay function. Thanks a lot

OkanDemirkaya commented 1 year ago

You can look at this issue https://github.com/hmongouachon/rgbKineticSlider/issues/13

I created function for playing autoplay.

You can look at page How to Implement JavaScript Auto-Repeat Functionality

jQuery(document).ready(function( $ ){
    // kinetic slider autoplay
    var waitingDuration = 1000;  // waiting for  1 second
    var counter = 0;
    var clickNextBtn = window.setInterval(function(){
        var nextBtn = document.querySelectorAll(".slider-controls span")[1];
        // when page load, waiting for 'waitingDuration'
        if(counter == 0){
            counter += 1;
        }
        else{
            nextBtn.click();
        }
        }, waitingDuration);
});
Anunnaki26 commented 1 year ago

great! thanks!

Anunnaki26 commented 1 year ago

it works! http://nirvana.bplaced.net/rgbkineticslider/