Why is the value of data-value=\"2.0\"
cast to a String and the value of data-value=\"2.5\"
cast to a Number?
I can handle this fine within my func
Looking through jQuery's source code, i have identified the reason.
It will parse it as a number, if, and only if, doing so does not change the string. Source: https://github.com/jquery/jquery/blob/master/src/data.js#L36
(+"2.0") + "" === "2" // !== the original string
(+"2.1") + "" === "2.1" // == the original string