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).
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).
Conversation
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.