.indexOf
isn't supported in <= IE8.
As a workaround you could create a custom indexOf()
implementation, placed in perhaps a centralised JS script file targeted for IE8. For example,
// create self-invoking anonymous indexOf() function
(function () {
if (!Array.prototype.indexOf) {
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;
};
}
})();