jQuery计时器插件选项没有设置

时间:2016-10-04 16:13:39

标签: javascript jquery angularjs

所以我试图在我的应用程序中运行jQuery计时器插件,但是在设置选项时遇到了问题。这是我正在使用的插件:

JQuery Countdown plugin

目前在Html文件中我有:

<div class="demo" data-timer="5"></div>

在页面的底部,我有:

angular.module('anxietyApp', ['ionic'])

.controller('MyCtrl', function($scope) {
  var ts = $(".demo").TimeCircles();
});

这正在我的网页上工作,但我似乎无法从链接中添加自定义选项。它说可用的选项是:

start: true, // determines whether or not TimeCircles should start immediately.
animation: "smooth", // smooth or ticks. The way the circles animate can be either a constant gradual rotating, slowly moving from one second to the other. 
count_past_zero: true, // This option is only really useful for when counting down. What it does is either give you the option to stop the timer, or start counting up after you've hit the predefined date (or your stopwatch hits zero).
circle_bg_color: "#60686F", // determines the color of the background circle.
use_background: true, // sets whether any background circle should be drawn at all. 
fg_width: 0.1, //  sets the width of the foreground circle. 
bg_width: 1.2, // sets the width of the backgroundground circle. 
text_size: 0.07, // This option sets the font size of the text in the circles. 
total_duration: "Auto", // This option can be set to change how much time will fill the largest visible circle.
direction: "Clockwise", // "Clockwise", "Counter-clockwise" or "Both".
use_top_frame: false,
start_angle: 0, // This option can be set to change the starting point from which the circles will fill up. 
time: { //  a group of options that allows you to control the options of each time unit independently.
  Days: {
    show: true,
    text: "Days",
    color: "#FC6"
  },
  Hours: {
    show: true,
    text: "Hours",
    color: "#9CF"
  },
  Minutes: {
    show: true,
    text: "Minutes",
    color: "#BFB"
  },
  Seconds: {
    show: true,
    text: "Seconds",
    color: "#F99"
  }
}

我觉得这很简单我只是错过了把选项放在哪里。

0 个答案:

没有答案