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($(this).css('marginBottom'), 10);
parseInt will automatically ignore the units.
For example:
var marginBottom = "10px"; marginBottom = parseInt(marginBottom, 10); alert(marginBottom); // alerts: 10