aboutsummaryrefslogtreecommitdiff
path: root/js/carousel.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/carousel.js')
-rw-r--r--js/carousel.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/js/carousel.js b/js/carousel.js
index 4c9a1165c..b68899009 100644
--- a/js/carousel.js
+++ b/js/carousel.js
@@ -14,7 +14,7 @@
// =========================
var Carousel = function (element, options) {
- this.$element = $(element).on('keydown.bs.carousel', $.proxy(this.keydown, this))
+ this.$element = $(element)
this.$indicators = this.$element.find('.carousel-indicators')
this.options = options
this.paused =
@@ -23,6 +23,8 @@
this.$active =
this.$items = null
+ this.options.keyboard && this.$element.on('keydown.bs.carousel', $.proxy(this.keydown, this))
+
this.options.pause == 'hover' && !('ontouchstart' in document.documentElement) && this.$element
.on('mouseenter.bs.carousel', $.proxy(this.pause, this))
.on('mouseleave.bs.carousel', $.proxy(this.cycle, this))
@@ -35,7 +37,8 @@
Carousel.DEFAULTS = {
interval: 5000,
pause: 'hover',
- wrap: true
+ wrap: true,
+ keyboard: true
}
Carousel.prototype.keydown = function (e) {