Left() function in Javascript or jQuery

Just do a parseInt("1008px", 10), it will ignore the ‘px’ for you.