Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //And manually call update once or at initial loading
- //E.g. in jquery: $(document).on("load", update);
- update();
- setInterval(update, 2500);
- function update()
- {
- for (var i = 0; i < slides.length; i++) {
- slides[i].style.opacity = 0;
- }
- slides[current].style.opacity = 1;
- current = (current != slides.length - 1) ? current + 1 : 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement