简体   繁体   中英

JQuery Knob plugin - animate the values rising on read only knobs? - Canvas

Here's a JSFiddle of the JQ Knob plugin which allows us to create dynamic stat wheels ("knobs")

The knob inputs are pretty basic:

<input type="text" data-width="150"
    data-fgColor="#6dc9ff"
    data-skin="tron"
    data-thickness=".1"
    data-angleOffset="180"
    data-readOnly="true"
    class="s2">

And they look great:

在此处输入图片说明

JSFiddle (full 694 line source):

http://jsfiddle.net/zfbud/

I've been trying to fix this plugin so that the knobs fill dynamically when populated via js:

$('.s1').val(97).trigger('change');

It seems like making that trigger add the value in an animated way rather than just snapping it should be a simple fix, but I keep breaking it, being pretty new to javascript.

Can anyone tweak this (or already know of a fix) that makes this simple plugin animate it's change for read only knobs?

I found the solution on this question:

Jquery Knob animate and change color

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM