This should be a very easy and quick one, but I don't understand why this is not working.
I'm trying to convert a string ("50.0") to a number using parseFloat()
This is the code:
// Lets say e.value = 20
var valueStr = e.value + '.0'; // valueStr = "20.0";
value = parseFloat(valueStr);
console.log (value);
I am expecting value
to be 20.0, but it returns 20.
I've checked this example and it does exactly the same thing, but it works in the example.
Here's a codepen with the full code (i'm modifying a jquery plugin called "roundSlider")
http://codepen.io/anon/pen/mPyxyv
Thanks in advance for any help.