bootstrap-accordion

Bootstrap 4 Collapse Accordion - always have one panel open

ぐ巨炮叔叔 提交于 2019-11-30 05:47:58
问题 I'm using Bootstrap 4.0's collapse component in an accordion similar to what they have on their docs. <div id="accordion"> <div class="card"> <div class="card-header" id="headingOne"> <h5 class="mb-0"> <button class="btn btn-link" data-toggle="collapse" data-target="#collapseOne" aria-expanded="true" aria-controls="collapseOne"> Collapsible Group Item #1 </button> </h5> </div> <div id="collapseOne" class="collapse show" aria-labelledby="headingOne" data-parent="#accordion"> <div class="card

Bootstrap 4 Accordian scroll to open content?

久未见 提交于 2019-11-29 17:16:53
I understand this question has been asked and I'm working with sample code of someone who asked a similar question ( Bootstrap accordion, scroll to top of active (open) accordion on click? ), but am unable to get it to work in my code. When a mobile user clicks on a button to view more, the content opens up below the screen. The user would have no idea it's there. When a user clicks the button to view the content, I would like the content to be scrolled to automatically. Here is my code: https://jsfiddle.net/bigtime/6yung8vk/2/ JQUERY: $('.panel-collapse').on('shown.bs.collapse', function(e) {

Bootstrap 4 Accordian scroll to open content?

一个人想着一个人 提交于 2019-11-28 11:00:29
问题 I understand this question has been asked and I'm working with sample code of someone who asked a similar question (Bootstrap accordion, scroll to top of active (open) accordion on click?), but am unable to get it to work in my code. When a mobile user clicks on a button to view more, the content opens up below the screen. The user would have no idea it's there. When a user clicks the button to view the content, I would like the content to be scrolled to automatically. Here is my code: https: