I know jQuery has a helper method for parsing unit strings into numbers. What is the jQuery method to do this?
var a = \"20px\"; var b = 20; var c = $.parseM
Sorry for the digging up, but:
var bar = "16px"; var foo = parseInt(bar, 10); // Doesn't work! Output is always 16px // and var foo = Number(s.replace(/px$/, '')); // No more!