0

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?

Imran
  • 1,094
  • 1
  • 21
  • 41

1 Answers1

1

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

Community
  • 1
  • 1
F.P
  • 17,421
  • 34
  • 123
  • 189