My favorites | Sign in
Project Logo
                
New issue | Search
for
| Advanced search | Search tips
Issue 4: Class.js Internet Explorer problem with indexOf
1 person starred this issue and may be notified of changes. Back to list
Status:  New
Owner:  ----
Type-Defect
Priority-Medium


Sign in to add a comment
 
Reported by patxi1980, May 28, 2009
I use the class.js to create OO Classes in jQuery. 

I have a problem with Internet Explorer. When i see the code, i see that
there is a call that uses indexOf to search inside an array.
IndexOf is not supported by InternetExplorer.

This must by fixed in order to make the class cross-browsers.


Comment 1 by martin.saulis, May 28, 2009
You need to add this JavaScript code to add indexOf functionality to IE6 (extending
Array class):

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 in to add a comment

Hosted by Google Code