Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use of Array.indexOf makes IE8 go sour. #1

Closed
O-Zone opened this issue Oct 30, 2013 · 1 comment
Closed

Use of Array.indexOf makes IE8 go sour. #1

O-Zone opened this issue Oct 30, 2013 · 1 comment

Comments

@O-Zone
Copy link

O-Zone commented Oct 30, 2013

First of all, thanks for a great and focused tool I really needed. :)

In transitionEnd_full.js line 83 you use Array.indexOf, which IE8 does not have by default.

If you want IE8 to continue execution after that line, either use a polyfill like this:

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

or rewrite line 83:

positonElement = this.list.indexOf(element);

to something like:

positonElement = -1;
for (var i=0; i < this.list.length; i++) {
    if (this.list[i] === element) {
        positonElement = i;
        break;
    }
}
@EvandroLG
Copy link
Owner

Thanks, man. I'm happy to know that you use the tool :)
The problem is solved 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants