Left() function in Javascript or jQuery -


I want a very easy way to extract the numbers outside of a string in JavaScript and I'm about to use jQuery I am thinking but I like the method which is the simplest, I have requested the "left" feature of the CSS block to use jQuery in this way:

  var stuff = $ ('# Block'). CSS ("left")  

The result of "stuff"

  1008px  

Only me "px" What is the best way to get rid of it because I have a parseInt about it? If Javascript has a left () function, it would be very simple.

Will ignore 'PX' for you.


Comments