92
To convert 245px in 245 just run:
parseInt('245px', 10);
It retains only leading numbers and discards all the rest.
use
var size = parseInt('245px', 10);
where 10 is the radix defining parseInt is parsing to a decimal value
The parseInt() function parses a string and returns an integer.
The signature is parseInt(string, radix)
The second argument forces parseInt to use a base ten numbering system.
why? if $(this).attr('num') would be "08" parsInt without a radix would become 0