0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-01-30 22:52:24 +01:00

change 'slid' comments per @fat's feedback

This commit is contained in:
Chris Rebert 2014-04-25 17:48:02 -07:00
parent 6617d8bcd1
commit 4bd29bfcff

View File

@ -59,7 +59,7 @@
if (pos > (this.$items.length - 1) || pos < 0) return if (pos > (this.$items.length - 1) || pos < 0) return
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 (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) // yes, "slid"
if (activeIndex == pos) return this.pause().cycle() if (activeIndex == pos) return this.pause().cycle()
return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos])) return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos]))
@ -114,13 +114,13 @@
if (this.$indicators.length) { if (this.$indicators.length) {
this.$indicators.find('.active').removeClass('active') this.$indicators.find('.active').removeClass('active')
this.$element.one('slid.bs.carousel', function () { // yes, "slid". not a typo. past tense of "to slide". this.$element.one('slid.bs.carousel', function () { // yes, "slid"
var $nextIndicator = $(that.$indicators.children()[that.getActiveIndex()]) var $nextIndicator = $(that.$indicators.children()[that.getActiveIndex()])
$nextIndicator && $nextIndicator.addClass('active') $nextIndicator && $nextIndicator.addClass('active')
}) })
} }
var slidEvent = $.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, "slid". not a typo. past tense of "to slide". var slidEvent = $.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, "slid"
if ($.support.transition && this.$element.hasClass('slide')) { if ($.support.transition && this.$element.hasClass('slide')) {
$next.addClass(type) $next.addClass(type)
$next[0].offsetWidth // force reflow $next[0].offsetWidth // force reflow