プロジェクト
GitHubで見る
jchavannes/jquery-timer
概要
オプションを追加したsetTimeoutのようなものです。
その他のプロジェクト計測したスター増加
- 24時間
- 0
- 7日間
- 0
- 15日間
- 0
- 1か月
- 履歴を収集中
期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。
README.md
オリジナルjQuery Timer
Basically setTimeout with more options.
View demo: http://jchavannes.com/jquery-timer/demo
Download: http://jchavannes.com/download/jquery-timer-demo.zip
$.timer()
$.timer( [ action ] , [ time ], [ autostart ] )
action A Function to be called by the timer.
time A Number determining how long between actions in milliseconds.
autostart A Boolean indicating whether to start the timer. Defaults to false.
Usage
var timer = $.timer(function() {
alert('This message was sent by a timer.');
});
timer.set({ time : 5000, autostart : true });
timer.set(options);
timer.play(reset); // Boolean. Defaults to false.
timer.pause();
timer.stop(); // Pause and resets
timer.toggle(reset); // Boolean. Defaults to false.
timer.once(time); // Number. Defaults to 0.
timer.isActive // Returns true if timer is running
timer.remaining // Remaining time when paused
License
See the LICENSE file for license rights and limitations (MIT).
関連プロジェクトを探す
読み込み中…