Permalink
Browse files

IE7 has no indexOf

  • Loading branch information...
simeonf committed Jul 25, 2011
1 parent beb671d commit e5893b281b7d0b9460a4df052a8f7e0b7c77787a
Showing with 1 addition and 1 deletion.
  1. +1 −1 jquery.yaselect.js
View
@@ -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.