}
, show: function () {
- var dimension = this.dimension()
- , scroll = $.camelCase(['scroll', dimension].join('-'))
- , actives = this.$parent && this.$parent.find('> .accordion-group > .in')
+ var dimension
+ , scroll
+ , actives
, hasData
+ if (this.transitioning) return
+
+ dimension = this.dimension()
+ scroll = $.camelCase(['scroll', dimension].join('-'))
+ actives = this.$parent && this.$parent.find('> .accordion-group > .in')
+ hasData
+
if (actives && actives.length) {
hasData = actives.data('collapse')
actives.collapse('hide')
}
, hide: function () {
- var dimension = this.dimension()
+ var dimension
+ if (this.transitioning) return
+ dimension = this.dimension()
this.reset(this.$element[dimension]())
this.transition('removeClass', 'hide', 'hidden')
this.$element[dimension](0)
var that = this
, complete = function () {
if (startEvent == 'show') that.reset()
+ that.transitioning = 0
that.$element.trigger(completeEvent)
}
+ this.transitioning = 1
+
this.$element
.trigger(startEvent)
[method]('in')
}
, show: function () {
- var dimension = this.dimension()
- , scroll = $.camelCase(['scroll', dimension].join('-'))
- , actives = this.$parent && this.$parent.find('> .accordion-group > .in')
+ var dimension
+ , scroll
+ , actives
, hasData
+ if (this.transitioning) return
+
+ dimension = this.dimension()
+ scroll = $.camelCase(['scroll', dimension].join('-'))
+ actives = this.$parent && this.$parent.find('> .accordion-group > .in')
+ hasData
+
if (actives && actives.length) {
hasData = actives.data('collapse')
actives.collapse('hide')
}
, hide: function () {
- var dimension = this.dimension()
+ var dimension
+ if (this.transitioning) return
+ dimension = this.dimension()
this.reset(this.$element[dimension]())
this.transition('removeClass', 'hide', 'hidden')
this.$element[dimension](0)
var that = this
, complete = function () {
if (startEvent == 'show') that.reset()
+ that.transitioning = 0
that.$element.trigger(completeEvent)
}
+ this.transitioning = 1
+
this.$element
.trigger(startEvent)
[method]('in')