I need to do a numeric calculation based on CSS properties. However, when I use this to get info:
$(this).css(\'marginBottom\')
it returns
parseint will truncate any decimal values (e.g. 1.5em gives 1).
parseint
1.5em
1
Try a replace function with regex e.g.
replace
$this.css('marginBottom').replace(/([\d.]+)(px|pt|em|%)/,'$1');