Quote:
Originally Posted by Crow
Don't know if this also happens with v5, but comparing an attribute (this.attr[1]) to -1 results in true when the attribute carries a string (this.attr[1] == -1 -> true when this.attr[1] = "foo", for example). Doing this on the clientside. Didn't give it a try with non-attribute variables. Seemed quite strange to me..
|
Converting the string to a number will be -1 if it's not a number.