Re:You Don't Need JQuery
by sesutton on Tuesday December 16, 2014 @09:17PM
(#8760751)
You're right it will only work for one class. This is actually a perfect example of jQuery smoothing out the rough edges for you. I think the split method would work (provided you remember to split with \s instead of just space). It actually took me a while to come up with a regex replace that won't break in some corner cases ( I think)
\b is out because it matches - and would kill stuff like foo-bar.
[ Parent
| on HN ]
There are no comments on this comment yet.