一款漂亮好用的jQuery时间轴播放器代码,自适应,可扩展。支持自动播放和点击进度条跳转到相应时间点。
js代码
<script src="./jquery.min.js"></script>
<script src="./jquery.progressTime.js"></script>
<script>
var hourTimestamp = 3600 * 1000;
var dayTimestamp = hourTimestamp * 24;
$("#progressTime").ProgressTime({
container: "progressTime",
startTime: new Date(formatDate(new Date(new Date().getTime() - dayTimestamp * 5), "YYYY/MM/DD 00:00:00")),
endTime: new Date(formatDate(new Date(), "YYYY/MM/DD 00:00:00")),
currentTime: new Date(formatDate(new Date(new Date().getTime() - dayTimestamp * 4), "YYYY/MM/DD 12:00:00")),
stopTime: new Date(formatDate(new Date(), "YYYY/MM/DD 00:00:00")),
interval: 300,
delay: 2000,
callback: function (config) {
},
animateCallback: function (config) {
console.log("动画完成");
console.log(this);
// 假如动画完成之后请求数据需要两秒
var timer = setTimeout(function () {
progressTime.autoPlay(progressTime.playSelf); // 两秒之后再继续走播放条
clearTimeout(timer);
}, 0);
}
});
</script>
系统已开启自动识别垃圾评论机制,识别到的自动封号,下载出错或者资源有问题请联系全栈客服QQ 1915635791