Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Otto <markdotto@gmail.com>2016-11-01 07:14:23 +0300
committerMark Otto <markdotto@gmail.com>2016-11-01 07:14:23 +0300
commit76d53404b552c9870c3d3bf0e1f8976bb3136f13 (patch)
treefd1f0974c01b35b5bf5593d8a14dbf2b1fc91209 /js/dist/carousel.js
parentf734814f6ba6c86673f771b073425ca6f7f72693 (diff)
grunt
Diffstat (limited to 'js/dist/carousel.js')
-rw-r--r--js/dist/carousel.js20
1 files changed, 14 insertions, 6 deletions
diff --git a/js/dist/carousel.js b/js/dist/carousel.js
index 4c2c5bf0f3..3e74d702bd 100644
--- a/js/dist/carousel.js
+++ b/js/dist/carousel.js
@@ -151,7 +151,7 @@ var Carousel = function ($) {
}
if (this._config.interval && !this._isPaused) {
- this._interval = setInterval($.proxy(document.visibilityState ? this.nextWhenVisible : this.next, this), this._config.interval);
+ this._interval = setInterval((document.visibilityState ? this.nextWhenVisible : this.next).bind(this), this._config.interval);
}
};
@@ -207,12 +207,20 @@ var Carousel = function ($) {
};
Carousel.prototype._addEventListeners = function _addEventListeners() {
+ var _this2 = this;
+
if (this._config.keyboard) {
- $(this._element).on(Event.KEYDOWN, $.proxy(this._keydown, this));
+ $(this._element).on(Event.KEYDOWN, function (event) {
+ return _this2._keydown(event);
+ });
}
if (this._config.pause === 'hover' && !('ontouchstart' in document.documentElement)) {
- $(this._element).on(Event.MOUSEENTER, $.proxy(this.pause, this)).on(Event.MOUSELEAVE, $.proxy(this.cycle, this));
+ $(this._element).on(Event.MOUSEENTER, function (event) {
+ return _this2.pause(event);
+ }).on(Event.MOUSELEAVE, function (event) {
+ return _this2.cycle(event);
+ });
}
};
@@ -281,7 +289,7 @@ var Carousel = function ($) {
};
Carousel.prototype._slide = function _slide(direction, element) {
- var _this2 = this;
+ var _this3 = this;
var activeElement = $(this._element).find(Selector.ACTIVE_ITEM)[0];
var nextElement = element || activeElement && this._getItemByDirection(direction, activeElement);
@@ -334,10 +342,10 @@ var Carousel = function ($) {
$(activeElement).removeClass(ClassName.ACTIVE).removeClass(direction).removeClass(directionalClassName);
- _this2._isSliding = false;
+ _this3._isSliding = false;
setTimeout(function () {
- return $(_this2._element).trigger(slidEvent);
+ return $(_this3._element).trigger(slidEvent);
}, 0);
}).emulateTransitionEnd(TRANSITION_DURATION);
} else {