How do I write the code below in jQuery and have it apply to all elements w/ class name of something. I am trying to get https://gist.github.com/1129073 to apply to multiple elements, specified by class, instead of just a single element, targeted by id.
More specifically, I'm looking at http://jsfiddle.net/fgnass/9BkjZ/ and trying to make it work on classes instead of just an id, so it can be applied to many elements.
(function(a,b,c){
setInterval(function(){
for(
b=0;
b<8;c||(a.innerHTML+='<i><b>'),
a.childNodes[b].style.opacity=(++b-~c)%8*.1+.2);
c=-~c
},99)
})(document.getElementsByClassName('something'));
The code above only works on the first element w/ class name of someting when using })(document.getElementsByClassName('something')[0]); as the last line.
getElementByIdtogetElementsByClassNamebecause I want it to apply to manyclassesinstead of just oneid.