0

i've got a problem with an indexOf method in Internet Explorer 8. Places where I use it in my code looks like these above:

1).

if ( this.allPlays.indexOf(date.getTime()) !== -1 ) {

2).

var others = $footer.text().indexOf('CURRENT') >= 0;

3).

if ( payment.title.indexOf('EURO') >= 0 ) {

4).

that.music.indexOf(calc.getMusic());

How to prepare code, what kind of function use? Array.prototype.indexOf also doesn't work properly.

PS. It's not a native JS, so i can use jQ methods.

Thank you in advance :)

user3844198
  • 205
  • 2
  • 6
  • 15

1 Answers1

0

jQuery provides inArray for arrays so you can avoid using the array version of indexOf (not present in IE8).

Two of your other examples are using the string version of indexOf which does exist in IE8.

iCollect.it Ltd
  • 92,391
  • 25
  • 181
  • 202