Team:Goettingen/suplement/scripts ie ff patch

From 2013.igem.org

Revision as of 19:54, 24 June 2013 by Demarcia (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

document.getElementsByClassName = function(cl) {

 var retnode = [];
 var elem = this.getElementsByTagName('*');
 for (var i = 0; i < elem.length; i++) {
   if((' ' + elem[i].className + ' ').indexOf(' ' + cl + ' ') > -1) retnode.push(elem[i]);
 }
 return retnode;

};

var getNextElementSibling = function (ob){

do {ob = ob.nextSibling; }while (ob && ob.nodeType !== 1); return ob; }