Quick Link: The Ultimate getElementsByClassName

Robert Nyman adds his version into the fray with his own getElementsByClassName function but accounts for that pesky hyphen (which is a special character in Regular Expression world).

Published November 07, 2005 · Updated September 14, 2006
Categorized as Quick Links
Short URL: https://snook.ca/s/450


1 Comment · RSS feed
Colin D. Devroe said on November 07, 2005

I actually had to write my own version of this until he finally got this one out.

I wasn't having a problem with a hyphen but rather with multiple classes being set on a single element. I think I must have had an older version or something - because it didn't work at all.

Needless to say, I can probably toss my own version now.

Sorry, comments are closed for this post. If you have any further questions or comments, feel free to send them to me directly.