Skip to content

Instantly share code, notes, and snippets.

@roykolak
Created January 29, 2009 19:29
Show Gist options
  • Save roykolak/54694 to your computer and use it in GitHub Desktop.
Save roykolak/54694 to your computer and use it in GitHub Desktop.
indexOf for IE6
if($.browser.msie) {
if(!Array.indexOf) {
Array.prototype.indexOf = function(obj){
for(var i=0; i<this.length; i++){
if(this[i]==obj){
return i;
}
}
return -1;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment