While trying to compute the width of an hidden element I found that jquery.width() returns 0 for that elements\' width.
I found out that using jquery.css(\'width\'
In plain JavaScript:
parseInt('100px', 10)
Works with "100em", "100%", and even with: "100". No need for any Regular Expression patterns.