/ Published in: JavaScript
URL: http://davidwalsh.name/javascript-css
Will take a hyphenated string and make it camel case.
Expand |
Embed | Plain Text
function camelize(str) { return (str + "").replace(/-\D/g, function(match) { return match.charAt(1).toUpperCase(); }); }
You need to login to post a comment.
