SMCountDown 倒计时插件
2015-12-01 本文已影响85人
圆梦人生
来源:http://itssh.cn/post/9.html
SMCountDown
github地址:https://github.com/sm0210/SMCountDown
author:SM
e-mail:sm0210@qq.com
desc:SMCountDown倒计时插件JS
version:SMCountDown 0.1
SMCountDown 倒计时插件,有问题发邮件:sm0210@qq.com
//实例化倒计时
var SMCountDown =$('#btnOk').initSMCountDown({delay:10});
//实例化倒计时2
var SMCountDown2 =$('#btnOk2').initSMCountDown({delay:20,delayTxt:'发送',disabled:true});//自定义计时文本
//点击启动倒计时
$('#btnOk3').click(function(){
SMCountDown.statrSMCountDown();
});
//点击停止计时
$('#btnOk4').click(function(){
SMCountDown.clearSMCountDown();
});
//启动第二个计时
SMCountDown2.statrSMCountDown();
html代码:
<input type="button" id="btnOk" value="开始倒计时"/>
<input type="button" id="btnOk2" value="开始倒计时测试"/>
<br/><br/>
<button id="btnOk3">启动计时</button>
<button id="btnOk4">停止计时</button>