summaryrefslogtreecommitdiffstats
path: root/dev/jquery.jtable.utils.js
diff options
context:
space:
mode:
Diffstat (limited to 'dev/jquery.jtable.utils.js')
-rw-r--r--dev/jquery.jtable.utils.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/dev/jquery.jtable.utils.js b/dev/jquery.jtable.utils.js
index fe4ba4f..e928107 100644
--- a/dev/jquery.jtable.utils.js
+++ b/dev/jquery.jtable.utils.js
@@ -130,4 +130,24 @@
});
+ /* Fix for array.indexOf method in IE7.
+ * This code is taken from http://www.tutorialspoint.com/javascript/array_indexof.htm */
+ if (!Array.prototype.indexOf) {
+ Array.prototype.indexOf = function (elt) {
+ var len = this.length;
+ var from = Number(arguments[1]) || 0;
+ from = (from < 0)
+ ? Math.ceil(from)
+ : Math.floor(from);
+ if (from < 0)
+ from += len;
+ for (; from < len; from++) {
+ if (from in this &&
+ this[from] === elt)
+ return from;
+ }
+ return -1;
+ };
+ }
+
})(jQuery);