vendor/assets/javascripts/collapse.js in flashgrid-2.3.0 vs vendor/assets/javascripts/collapse.js in flashgrid-3.0.0

- old
+ new

@@ -45,10 +45,11 @@ var dimension = this.dimension() this.$element .removeClass('collapse') .addClass('collapsing')[dimension](0) + .attr('aria-expanded', true) this.transitioning = 1 var complete = function () { this.$element @@ -80,19 +81,20 @@ this.$element[dimension](this.$element[dimension]())[0].offsetHeight this.$element .addClass('collapsing') .removeClass('collapse in') + .attr('aria-expanded', false) this.transitioning = 1 var complete = function () { this.transitioning = 0 this.$element - .trigger('hidden.bs.collapse') .removeClass('collapsing') .addClass('collapse') + .trigger('hidden.bs.collapse') } if (!$.support.transition) return complete.call(this) this.$element @@ -150,11 +152,12 @@ var option = data ? 'toggle' : $this.data() var parent = $this.attr('data-parent') var $parent = parent && $(parent) if (!data || !data.transitioning) { - if ($parent) $parent.find('[data-toggle="collapse"][data-parent="' + parent + '"]').not($this).addClass('collapsed') - $this.toggleClass('collapsed', $target.hasClass('in')) + if ($parent) $parent.find('[data-toggle="collapse"][data-parent="' + parent + '"]').not($this).addClass('collapsed').attr('aria-expanded', false) + var isCollapsed = $target.hasClass('in') + $this.toggleClass('collapsed', isCollapsed).attr('aria-expanded', !isCollapsed) } Plugin.call($target, option) }) \ No newline at end of file