I have number value returning from my backend but it my knob it return as NaN
and I've searched this website and googled it but all I got was the way to test if my value isNaN
or not, which is not.
Code
console.log('As of String: ', data.inProgress.toString());
console.log('As of Number: ', data.inProgress);
if (isNaN(data.inProgress)) {
console.log('Not a Number!');
} else {
console.log('Is a Number!');
}
Result
Usage
$('#knobProgress')
.val(data.inProgress)
.trigger(
'configure',
{
"min":0,
"max":data.total, //2
}
);
Update
If I comment trigger
part from my code it works just fine, whatever the issue is, is coming from trigger part.
This works
$('#knobProgress')
.val(data.inProgress);
// .trigger(
// 'configure',
// {
// "min":0,
// "max":data.total, //2
// }
// );