Javascript-форум (https://javascript.ru/forum/)
-   jQuery (https://javascript.ru/forum/jquery/)
-   -   jQuery Timers (https://javascript.ru/forum/jquery/21551-jquery-timers.html)

adax 14.09.2011 16:37

jQuery Timers
 
плагин jQuery Timers

есть stopTime(), останавливает текущий счетчик времени.

а есть наподобие clearTime() - чтобы данный счетчик сбросить ?

т.е. у меня к примеру много счетчиков на странице. нужно по клику каждой кнопкой (для каждого счетчика) запускать и сбрасывать данный счетчик.

Реально этим плагином сделать, или только setTimeout поможет ?

$(".c ."+idThis).everyTime(1000, idThis, function(i) {
            $(".c ."+idThis+" .timer").text(5-i);
		}, 5);
		
		$(".deltimer .timer").oneTime("5s", idThis, function() {	
			$(".c tr.delel").each(function(){
				if ($(this).hasClass(idThis)) {
					$(this).slideUp('fast', function(){
						$(this).remove();
					});
				}
			});
		});


и сама кнопка

$("a.remove").live('click', function() {
					var delElem02 = $(this).parent().parent().parent().parent().parent().attr('class');
					var delElem2 = delElem02.split(" ");
					var idThis2 = delElem2[1];
					$(".c ."+idThis2+" .timer").stopTime(idThis2);//тут нужно не остановить а сбросить
					$(".c ."+idThis2).slideUp('fast', function(){
						$(this).remove();
					});
				});


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