aboutsummaryrefslogtreecommitdiff
path: root/js/src/carousel.js
diff options
context:
space:
mode:
authorfat <[email protected]>2015-05-12 16:52:54 -0700
committerfat <[email protected]>2015-05-12 16:52:54 -0700
commitab1578465aee4a776412b48f16bfefca79381919 (patch)
tree0766caa82a67cd6328273aa5f2a826c579d44d32 /js/src/carousel.js
parenta58febf71a5eac2161ce2db08c7d723755ed1163 (diff)
downloadbootstrap-ab1578465aee4a776412b48f16bfefca79381919.tar.xz
bootstrap-ab1578465aee4a776412b48f16bfefca79381919.zip
grunt test-js, grunt dist-js now working
Diffstat (limited to 'js/src/carousel.js')
-rw-r--r--js/src/carousel.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/js/src/carousel.js b/js/src/carousel.js
index bce51d7fd..8c9b45247 100644
--- a/js/src/carousel.js
+++ b/js/src/carousel.js
@@ -139,7 +139,7 @@ const Carousel = (($) => {
if (this._config.interval && !this._isPaused) {
this._interval = setInterval(
- this.next.bind(this), this._config.interval
+ $.proxy(this.next, this), this._config.interval
)
}
}
@@ -177,14 +177,14 @@ const Carousel = (($) => {
_addEventListeners() {
if (this._config.keyboard) {
$(this._element)
- .on('keydown.bs.carousel', this._keydown.bind(this))
+ .on('keydown.bs.carousel', $.proxy(this._keydown, this))
}
if (this._config.pause == 'hover' &&
!('ontouchstart' in document.documentElement)) {
$(this._element)
- .on('mouseenter.bs.carousel', this.pause.bind(this))
- .on('mouseleave.bs.carousel', this.cycle.bind(this))
+ .on('mouseenter.bs.carousel', $.proxy(this.pause, this))
+ .on('mouseleave.bs.carousel', $.proxy(this.cycle, this))
}
}