2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-05 16:42:29 +03:00

add special transitionend type to test event origin

fixes #13430
This commit is contained in:
fat
2014-06-10 19:56:08 -07:00
parent 9cdbf0e807
commit 7f122be004
7 changed files with 24 additions and 25 deletions
+4 -15
View File
@@ -61,18 +61,12 @@
this.transitioning = 1
var complete = function (e) {
if (e && e.target != this.$element[0]) {
this.$element
.one($.support.transition.end, $.proxy(complete, this))
return
}
var complete = function () {
this.$element
.removeClass('collapsing')
.addClass('collapse in')[dimension]('')
this.transitioning = 0
this.$element
.off($.support.transition.end + '.bs.collapse')
.trigger('shown.bs.collapse')
}
@@ -81,7 +75,7 @@
var scrollSize = $.camelCase(['scroll', dimension].join('-'))
this.$element
.on($.support.transition.end + '.bs.collapse', $.proxy(complete, this))
.one('bsTransitionEnd', $.proxy(complete, this))
.emulateTransitionEnd(350)[dimension](this.$element[0][scrollSize])
}
@@ -103,12 +97,7 @@
this.transitioning = 1
var complete = function (e) {
if (e && e.target != this.$element[0]) {
this.$element
.one($.support.transition.end, $.proxy(complete, this))
return
}
var complete = function () {
this.transitioning = 0
this.$element
.trigger('hidden.bs.collapse')
@@ -120,7 +109,7 @@
this.$element
[dimension](0)
.one($.support.transition.end, $.proxy(complete, this))
.one('bsTransitionEnd', $.proxy(complete, this))
.emulateTransitionEnd(350)
}