javascript - edit jquery-knob counter to display fraction of second -



javascript - edit jquery-knob counter to display fraction of second -

i create time counter using knob:

$(function($) { $(".knob").knob({ 'fgcolor': '#b9e672', 'thickness': 0.3, 'width':150, 'data-min': 0, 'data-max': 30, 'readonly': true }); var initval = 30; $({value: 0}).animate({value: initval},{ duration: 10000, easing:'swing', step: function() { $('.knob').val(this.value).trigger('change'); } }); });

i want display counter in milliseconds, picture:

how this?

thanks,

you can utilize step alternative chose step update in knob value.

there useful thing can do, set draw function. draw function determines gets drawn in label. default, matches value, don't have to.

for instance, if want update knob in milliseconds, want round value display total seconds in label, like:

draw: function () { $(this.i).val(math.round(this.cv)); }

where, accordingly comments on jquery-knob source, this.cv "change value ; not commited value", , this.i "mixed htmlinputelement or array of htmlinputelement"

javascript jquery jquery-knob

Comments

Popular posts from this blog

assembly - What is the addressing mode for ld, add, and rjmp instructions? -

vowpalwabbit - Interpreting Vowpal Wabbit results: Why are some lines appended by "h"? -

ubuntu - Bash Script to Check That Files Are Being Created -