aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2014-03-31 20:08:07 -0700
committerMark Otto <[email protected]>2014-03-31 20:08:07 -0700
commit680be24cd94f1a753bad4565961dfd4703085c35 (patch)
treeee32f1253c5a50ad9dd9b05db7a605c1560d884f
parent158b491f26ed2b4cfec77cabc042f1004fc77507 (diff)
parent26f6807a3d0f2c72907379087f5f8358c87b030e (diff)
downloadbootstrap-680be24cd94f1a753bad4565961dfd4703085c35.tar.xz
bootstrap-680be24cd94f1a753bad4565961dfd4703085c35.zip
Merge pull request #13249 from twbs/slid-is-not-a-typo
Add comments in carousel.js to clarify that "slid" is not a typo
-rw-r--r--js/carousel.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/js/carousel.js b/js/carousel.js
index 6d6fa0aee..9f063aec0 100644
--- a/js/carousel.js
+++ b/js/carousel.js
@@ -59,7 +59,7 @@
if (pos > (this.$items.length - 1) || pos < 0) return
- if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) })
+ if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) // yes, "slid". not a typo. past tense of "to slide".
if (activeIndex == pos) return this.pause().cycle()
return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos]))
@@ -113,7 +113,7 @@
if (this.$indicators.length) {
this.$indicators.find('.active').removeClass('active')
- this.$element.one('slid.bs.carousel', function () {
+ this.$element.one('slid.bs.carousel', function () { // yes, "slid". not a typo. past tense of "to slide".
var $nextIndicator = $(that.$indicators.children()[that.getActiveIndex()])
$nextIndicator && $nextIndicator.addClass('active')
})
@@ -129,14 +129,14 @@
$next.removeClass([type, direction].join(' ')).addClass('active')
$active.removeClass(['active', direction].join(' '))
that.sliding = false
- setTimeout(function () { that.$element.trigger('slid.bs.carousel') }, 0)
+ setTimeout(function () { that.$element.trigger('slid.bs.carousel') }, 0) // yes, "slid". not a typo. past tense of "to slide".
})
.emulateTransitionEnd($active.css('transition-duration').slice(0, -1) * 1000)
} else {
$active.removeClass('active')
$next.addClass('active')
this.sliding = false
- this.$element.trigger('slid.bs.carousel')
+ this.$element.trigger('slid.bs.carousel') // yes, "slid". not a typo. past tense of "to slide".
}
isCycling && this.cycle()