No change in the filling colored knob jquery

219 Views Asked by At

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:

Image

Why?

1

There are 1 best solutions below

0
On

Try to change:

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

to

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