I have custom js/jquery code which is running fine on all browsers including IE9 except IE8 and IE 7. It says: Object does not support this property or method. http://screencast.com/t/YJkW5NF2gg
The code starts from the line, error refers to, is look like:
if(myBrand.indexOf(item) > -1){
$("ul.brandList", self.checkboxContainer).append(p);
}else if(myPro.indexOf(item) > -1){
$("ul.proList", self.checkboxContainer).append(p);
}else if(mySize.indexOf(item) > -1){
$("ul.sizeList", self.checkboxContainer).append(p);
}else if(myColor.indexOf(item) > -1){
$("ul.colorList", self.checkboxContainer).append(p);
}
Any Idea how to resolve this?
Well, IE just doesn’t know that method. As the error says… (And google tells you, too!)
You’d either have to create a jQuery object out of the array or define the function to the array prototype yourself, see here and here