简体   繁体   中英

No change in the filling colored knob jquery

I plugged in the form of a knob jquery in this way:

<input id="Totali" type="text" class="dial" value="30" data-angleOffset="-125" data-angleArc="250" data-fgColor="#00a0e0" data-angleOffset=-125 data-width="70" data-displayInput="true" data-readOnly="true" data-thickness=".15" />
<input id="Fermi" type="text" class="dial" value="30" data-angleOffset="-125" data-angleArc="250" data-fgColor="#00a0e0" data-angleOffset=-125 data-width="70" data-displayInput="true" data-readOnly="true" data-thickness=".15" />

and at the time of the change in the code:

$('.dial')
    .trigger(
        'configure', {
            "min": 0,
            "max": parseInt(markers.length)
        }
);

$('.dial[id=Totali]')
    .val(parseInt(markers.length))
    .trigger('change');

$('.dial[id=Fermi]')
    .val(parseInt(21))
    .trigger('change');

But it only changes the label but not the fill color:

图片

Why?

Try to change:

$('.dial[id=Totali]')
$('.dial[id=Fermi]')

to

$('#Totali')
$('#Fermi')

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