我正在使用FlipClock 1.1a,我想在倒计时结束时设置图像并隐藏计数器.目前,当时间到了,计数器进入时间(-1小时,-12分钟).我怎样才能做到这一点?该网站回调很少,没有帮助.
他们在代码库中提供了不同的示例,其中包括反停止事件.因此,您需要使用FlipClock的stop回调执行所需的操作,
var clock;
$(document).ready(function() {
clock = $('.clock').FlipClock(10, {
clockFace: 'MinuteCounter',
countdown: true,
callbacks: {
stop: function() {
// Do whatever you want to do here,
// that may include hiding the clock
// or displaying the image you mentioned
$('.message').html('The clock has stopped!');
}
}
});
});
Run Code Online (Sandbox Code Playgroud)
PS
如果您已经下载了整个源文件,可以查看演示本身 /FlipClock-master/examples/countdown-stop-callback.html
| 归档时间: |
|
| 查看次数: |
4080 次 |
| 最近记录: |