parseInt($(this).css('marginBottom'), 10);
parseInt will automatically ignore the units.
For example:
var marginBottom = "10px";
marginBottom = parseInt(marginBottom, 10);
alert(marginBottom); // alerts: 10
parseInt($(this).css('marginBottom'), 10);
parseInt will automatically ignore the units.
For example:
var marginBottom = "10px";
marginBottom = parseInt(marginBottom, 10);
alert(marginBottom); // alerts: 10