fix ie8 compat, closes #7
This commit is contained in:
parent
1ab192ac7b
commit
341a3cd8b5
@ -129,7 +129,7 @@
|
||||
function installDebouncedScroll(threshold, element) {
|
||||
var notify = debounce(threshold, function (e) { element.trigger("scroll-debounced", e);});
|
||||
element.on("scroll", function (e) {
|
||||
if (element.get().indexOf(e.target) >= 0) notify(e);
|
||||
if (indexOf(e.target, element.get()) >= 0) notify(e);
|
||||
});
|
||||
}
|
||||
|
||||
@ -451,7 +451,7 @@
|
||||
var choices = this.results.children(".select2-result");
|
||||
|
||||
if (arguments.length === 0) {
|
||||
return choices.get().indexOf(choices.filter(".select2-highlighted")[0]);
|
||||
return indexOf(choices.filter(".select2-highlighted")[0], choices.get());
|
||||
}
|
||||
|
||||
choices.removeClass("select2-highlighted");
|
||||
@ -1138,7 +1138,7 @@
|
||||
select2.init(opts);
|
||||
} else if (typeof(args[0]) === "string") {
|
||||
|
||||
if (allowedMethods.indexOf(args[0]) < 0) {
|
||||
if (indexOf(args[0], allowedMethods) < 0) {
|
||||
throw "Unknown method: " + args[0];
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user