Javascript-форум (https://javascript.ru/forum/)
-   Общие вопросы Javascript (https://javascript.ru/forum/misc/)
-   -   Автопрокрутка по input (https://javascript.ru/forum/misc/38450-avtoprokrutka-po-input.html)

sergiocharm 02.06.2013 14:02

Автопрокрутка по input
 
Ребят подскажите как сделать возврат к первому input, чтобы input переставлялся постоянно?
Исходник переставляет чек до последнего input и останавливается.
http://jsfiddle.net/kmJkP/

СпасибО!

sergiocharm 02.06.2013 14:27

Спасибо! Ответ нашел сам...
Кому пригодится http://jsfiddle.net/vSFtM/5/
$(document).ready(function(){
    setInterval(function() { nextIteration(); }, 500);
    var current_index = 1;
    var total = 5;
    function nextIteration() {
      $('#slide'+current_index).prop('checked', true);
      current_index = current_index + 1 > total ? 1 : current_index + 1;
   }
})


Часовой пояс GMT +3, время: 20:29.