fix indexOf in internet explorer

11:26 AM

(3) Comments

when you try to use indexOf javascript it will not work on ie
the perfect solution is to create simulated function if indexOf not exists

if(!Array.indexOf){
    Array.prototype.indexOf = function(obj){
        for(var i=0; i<this.length; i++){
            if(this[i]==obj){
                return i;
            }
        }
        return -1;
    }
}

eslam

,