Skip to content
Browse files

IE7 has no indexOf

  • Loading branch information...
1 parent beb671d commit e5893b281b7d0b9460a4df052a8f7e0b7c77787a @simeonf committed
Showing with 1 addition and 1 deletion.
  1. +1 −1 jquery.yaselect.js
View
2 jquery.yaselect.js
@@ -46,7 +46,7 @@ jQuery.fn.yaselect = function(options) {
.appendTo(anchor);
wrap
.mousedown(function(e) { jselect.click(); })
- .keydown(function(e) { if ([13,32,37,38,39,40].indexOf(e.which) != -1) { e.preventDefault(); jselect.click(); } }); /* preventDefault avoid pagescroll */
+ .keydown(function(e) { if (e.which == 13 || e.which == 32 || (37 <= e.which <= 40)) { e.preventDefault(); jselect.click(); } }); /* preventDefault avoid pagescroll */
select.size = Math.min(select.options.length, options.size || 10);
confirm();
});

0 comments on commit e5893b2

Please sign in to comment.
Something went wrong with that request. Please try again.