diff options
| author | fat <[email protected]> | 2013-12-24 12:50:55 -0800 |
|---|---|---|
| committer | fat <[email protected]> | 2013-12-24 12:50:55 -0800 |
| commit | fe7fffe034f8a97aae004351ee46fe9a704a971e (patch) | |
| tree | 057217fcc2a4dd86ad02f26234d9e5a6784c739f /dist/js/bootstrap.js | |
| parent | 0a75e4c09b77035e9492006647da8d1900d24f75 (diff) | |
| parent | ed1bd2b150dd645c11f92126a12183985ddbbc15 (diff) | |
| download | bootstrap-fe7fffe034f8a97aae004351ee46fe9a704a971e.tar.xz bootstrap-fe7fffe034f8a97aae004351ee46fe9a704a971e.zip | |
Merge branch 'slide-event-reset' of git://github.com/Rowno/bootstrap into Rowno-slide-event-reset
Conflicts:
js/tests/unit/carousel.js
Diffstat (limited to 'dist/js/bootstrap.js')
| -rw-r--r-- | dist/js/bootstrap.js | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/dist/js/bootstrap.js b/dist/js/bootstrap.js index 1997d77d8..112231b15 100644 --- a/dist/js/bootstrap.js +++ b/dist/js/bootstrap.js @@ -35,6 +35,8 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery" return { end: transEndEventNames[name] } } } + + return false // explicit for ie8 ( ._.) } // http://blog.alexmaccaw.com/css-transitions @@ -347,13 +349,15 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery" $next = this.$element.find('.item')[fallback]() } - this.sliding = true - - isCycling && this.pause() + if ($next.hasClass('active')) return var e = $.Event('slide.bs.carousel', { relatedTarget: $next[0], direction: direction }) + this.$element.trigger(e) + if (e.isDefaultPrevented()) return - if ($next.hasClass('active')) return + this.sliding = true + + isCycling && this.pause() if (this.$indicators.length) { this.$indicators.find('.active').removeClass('active') @@ -364,8 +368,6 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery" } if ($.support.transition && this.$element.hasClass('slide')) { - this.$element.trigger(e) - if (e.isDefaultPrevented()) return $next.addClass(type) $next[0].offsetWidth // force reflow $active.addClass(direction) @@ -379,8 +381,6 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery" }) .emulateTransitionEnd($active.css('transition-duration').slice(0, -1) * 1000) } else { - this.$element.trigger(e) - if (e.isDefaultPrevented()) return $active.removeClass('active') $next.addClass('active') this.sliding = false |
