【发布时间】:2014-04-21 16:17:32
【问题描述】:
这是我目前所拥有的。我希望能够从提交按钮中删除隐藏的类,然后将计时器值复制到隐藏的文本字段中。任何帮助,将不胜感激。
jQuery(document).ready(function($) {
$(".timer").TimeCircles({
"start": false,
"animation": "smooth",
"bg_width": 1.2,
"fg_width": 0.1,
"circle_bg_color": "#60686F",
"time": {
"Days": {
"text": "Days",
"color": "#FFCC66",
"show": false
},
"Hours": {
"text": "Hours",
"color": "#99CCFF",
"show": false
},
"Minutes": {
"text": "Minutes",
"color": "#BBFFBB",
"show": true
},
"Seconds": {
"text": "Seconds",
"color": "#FF9999",
"show": true
}
}
});
$(".stop").click(function(){
$(".timer.stopwatch").TimeCircles().stop();
});
$(".start").click(function(){
$(".timer.stopwatch").TimeCircles().start();
//remove class hidden on submit button
//copy timer value to text field
});
//$(".restart").click(function(){
// $(".timer.stopwatch").TimeCircles().restart();
//});
});
【问题讨论】:
-
欢迎来到 SO。目前尚不清楚你要做什么......你什么时候想从按钮中删除类......?
.TimeCircles是什么?你在使用插件..?请使用适当的信息更新问题... -
TimeCircles 是一个 Jquery 计时器/秒表插件。作者的回答正是我想要的。谢谢。
标签: jquery return-value