A polyfill for HTML5's getElementsByClassName()
method. In only 126 bytes.
- IE < 5
- FF > 20
Uses deprecated document.all
See the 140byt.es site for a showcase of entries (built itself using 140-byte entries!), and follow @140bytes on Twitter.
To learn about byte-saving hacks for your own code, or to contribute what you've learned, head to the wiki.
140byt.es is brought to you by Jed Schmidt, with help from Alex Kloss. It was inspired by work from Thomas Fuchs and Dustin Diaz.
@atk I don't believe your version doesn't follow the rules of 140 bytes. (correct me if I'm wrong here)
The function in index.js should be anonymous and assignable to any variable. Yours is self-referential, no?
And thanks for the n variable leakage, will fix.