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 function. I'm just trying to understand a little more about how Javascript handles Numbers and Strings. This kind of caught me off guard.
<a data-value="2.0">2.0</a>
<a data-value="2.5">2.5</a>
$("a").click(function() {
alert(typeof $(this).data( "value"));
});