Welcome to the world of octal numbers.
If the input line starts with "0", the radius is eight (octal). This function is non-standard, and some implementations intentionally do not support it (use radix 10 instead). For this reason, always specify the radius when using parseInt.
Use base with base 10 with parseInt .
parseInt($('span', a).text(), 10)
epascarello
source share