mirror of
https://github.com/tenrok/bootstrap.git
synced 2026-06-02 16:04:07 +03:00
Fixes #7213 Collapse plugin does not correctly set the "collapsed" class on accordion heading links
This commit is contained in:
Vendored
+6
@@ -160,6 +160,12 @@
|
||||
|| e.preventDefault()
|
||||
|| (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7
|
||||
, option = $(target).data('collapse') ? 'toggle' : $this.data()
|
||||
, parent = $this.attr('data-parent')
|
||||
, $parent = parent && $(parent)
|
||||
|
||||
if ($parent) {
|
||||
$parent.find('[data-toggle=collapse][data-parent=' + parent + ']').not($this).addClass('collapsed')
|
||||
}
|
||||
$this[$(target).hasClass('in') ? 'addClass' : 'removeClass']('collapsed')
|
||||
$(target).collapse(option)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user