Skip to content

Instantly share code, notes, and snippets.

@wookiehangover
Created July 24, 2010 21:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wookiehangover/488963 to your computer and use it in GitHub Desktop.
Save wookiehangover/488963 to your computer and use it in GitHub Desktop.
// duck punch Array.indexOf into IE browsers
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