/ Published in: JavaScript
This prepends a # if it's not already there. Useful when doing jQuery selectors.
Expand |
Embed | Plain Text
Evan.idify = function(id) { if (id[0] !== '#') return '#' + id; return id; }
You need to login to post a comment.
