diff options
| author | Ivan Khalopik <[email protected]> | 2013-03-29 17:55:14 +0300 |
|---|---|---|
| committer | Ivan Khalopik <[email protected]> | 2013-03-29 19:17:03 +0300 |
| commit | 41c782567775d3bbcfc62d163ae22a531277b5e2 (patch) | |
| tree | 56ab06a50a2bab0664f83e32847572bbe80e1978 /js/bootstrap-collapse.js | |
| parent | d5303906bd784619d8f2fa5a8244836056e5139d (diff) | |
| download | bootstrap-41c782567775d3bbcfc62d163ae22a531277b5e2.tar.xz bootstrap-41c782567775d3bbcfc62d163ae22a531277b5e2.zip | |
Fixes #7213 Collapse plugin does not correctly set the "collapsed" class on accordion heading links
Diffstat (limited to 'js/bootstrap-collapse.js')
| -rw-r--r-- | js/bootstrap-collapse.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/js/bootstrap-collapse.js b/js/bootstrap-collapse.js index 2730a48d4..813462a24 100644 --- a/js/bootstrap-collapse.js +++ b/js/bootstrap-collapse.js @@ -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) }) |
