javascript - Using collapsible elements like an accordian - Bootstrap 3 -


i have seen bootstrap 3 default functionality accordians close other collapsible elements when 1 open.

is possible using collapse?

<div class="collapse" id="collapse5">      <p> venenatis tincidunt. fusce @ dolor nunc.          duis maximus pulvinar leo, id laoreet massa tincidunt ut.          quisque scelerisque sit amet ipsum eget ornare.          donec eu blandit lectus. suspendisse potenti.          praesent posuere enim sapien. etiam et ullamcorper sem.          nam quis leo eu enim porttitor mattis vitae vel libero.          curabitur feugiat nec nulla quis luctus.    </p> </div>  <button class="btn my-btn" type="button" data-toggle="collapse" data-  target="#collapse5" aria-expanded="false" aria-controls="collapseexample" onclick="this.classlist.toggle('open2')">                 &nbsp; </button> 

essentially button opens collapsible div, possible if id 5 open, close other 4?

or should convert these elements accordian?

if dont want use accordian must place onclick event on other buttons or can use accordian 

check fiddle bootstrap accordian


Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - IE9 error '$'is not defined -