diff options
| author | Mark Otto <[email protected]> | 2016-06-12 21:17:14 -0700 |
|---|---|---|
| committer | Mark Otto <[email protected]> | 2016-06-12 21:17:14 -0700 |
| commit | aaad85bc306ccf35bd749ea43d2aa768e4ebabeb (patch) | |
| tree | 8011d6e04d1bb4c87356036eba55cc13639bc96a /js/dist/carousel.js | |
| parent | 8feae9075ae55be4e6cd0e884fbfa006a6639ceb (diff) | |
| parent | ce2e944aa6957528f23f1f7e680ac0cb4a75dcac (diff) | |
| download | bootstrap-aaad85bc306ccf35bd749ea43d2aa768e4ebabeb.tar.xz bootstrap-aaad85bc306ccf35bd749ea43d2aa768e4ebabeb.zip | |
Merge branch 'v4-dev' of https://github.com/twbs/bootstrap into v4-dev
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 aedad9ddf..70a72703d 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; } |
