diff options
| author | fat <[email protected]> | 2013-11-14 23:58:29 -0800 |
|---|---|---|
| committer | fat <[email protected]> | 2013-11-14 23:58:29 -0800 |
| commit | 7545da2e3c5488b1bcc9c70fecac759232466756 (patch) | |
| tree | db90375905dd18e7c428b4899b7492f6c2f37091 /js | |
| parent | 57b59fcfd02799915d9bf4fc19f30cfa71b2d66c (diff) | |
| download | bootstrap-7545da2e3c5488b1bcc9c70fecac759232466756.tar.xz bootstrap-7545da2e3c5488b1bcc9c70fecac759232466756.zip | |
fixes #11477 and updates slid event in carousel with namespace
Diffstat (limited to 'js')
| -rw-r--r-- | js/carousel.js | 8 | ||||
| -rw-r--r-- | js/scrollspy.js | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/js/carousel.js b/js/carousel.js index 902d4d781..a31bb071f 100644 --- a/js/carousel.js +++ b/js/carousel.js @@ -69,7 +69,7 @@ if (pos > (this.$items.length - 1) || pos < 0) return - if (this.sliding) return this.$element.one('slid', function () { that.to(pos) }) + if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) if (activeIndex == pos) return this.pause().cycle() return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos])) @@ -121,7 +121,7 @@ if (this.$indicators.length) { this.$indicators.find('.active').removeClass('active') - this.$element.one('slid', function () { + this.$element.one('slid.bs.carousel', function () { var $nextIndicator = $(that.$indicators.children()[that.getActiveIndex()]) $nextIndicator && $nextIndicator.addClass('active') }) @@ -139,7 +139,7 @@ $next.removeClass([type, direction].join(' ')).addClass('active') $active.removeClass(['active', direction].join(' ')) that.sliding = false - setTimeout(function () { that.$element.trigger('slid') }, 0) + setTimeout(function () { that.$element.trigger('slid.bs.carousel') }, 0) }) .emulateTransitionEnd(600) } else { @@ -148,7 +148,7 @@ $active.removeClass('active') $next.addClass('active') this.sliding = false - this.$element.trigger('slid') + this.$element.trigger('slid.bs.carousel') } isCycling && this.cycle() diff --git a/js/scrollspy.js b/js/scrollspy.js index 1d2fc7859..b11ecdf29 100644 --- a/js/scrollspy.js +++ b/js/scrollspy.js @@ -113,7 +113,7 @@ .addClass('active') } - active.trigger('activate') + active.trigger('activate.bs.scrollspy') } |
