diff options
author | Chris Rebert <code@chrisrebert.com> | 2016-06-05 04:21:15 +0300 |
---|---|---|
committer | Chris Rebert <code@chrisrebert.com> | 2016-06-05 04:21:15 +0300 |
commit | 0f3d427bbdccec8597dff63494d390df6b441c24 (patch) | |
tree | f6d0ef48442bd0067210188031bd091aab8fdf16 /js/dist/carousel.js | |
parent | eb350d1a7c91a42b4d943b13edf9304309920cb7 (diff) |
grunt
[ci skip]
Diffstat (limited to 'js/dist/carousel.js')
-rw-r--r-- | js/dist/carousel.js | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/js/dist/carousel.js b/js/dist/carousel.js index aedad9ddf3..70a72703d8 100644 --- a/js/dist/carousel.js +++ b/js/dist/carousel.js @@ -26,6 +26,8 @@ var Carousel = (function ($) { var DATA_API_KEY = '.data-api'; var JQUERY_NO_CONFLICT = $.fn[NAME]; var TRANSITION_DURATION = 600; + var ARROW_LEFT_KEYCODE = 37; // KeyboardEvent.which value for left arrow key + var ARROW_RIGHT_KEYCODE = 39; // KeyboardEvent.which value for right arrow key var Default = { interval: 5000, @@ -241,10 +243,12 @@ var Carousel = (function ($) { } switch (event.which) { - case 37: - this.prev();break; - case 39: - this.next();break; + case ARROW_LEFT_KEYCODE: + this.prev(); + break; + case ARROW_RIGHT_KEYCODE: + this.next(); + break; default: return; } |