0
私はJSを使わずに折り畳み可能なメニューを作るためにRailsでBootstrap4を使用しています。各メニュー項目は、divを展開して他の項目を折りたたむことになっています。しかし、私はそれをすることができません。 1つのボタンをクリックして他のdivをすべて折りたたむ方法はありますか?Bootstrap4:ボタンで区切りを表示/非表示
%button.btn.dropdown-toggle{"aria-expanded" => "false", "aria-haspopup" => "true", "data-toggle" => "dropdown", :type => "button"}
All Stuff
.dropdown-menu
%a.dropdown-item{"aria-controls" => "collapseFree", "aria-expanded" => "false", "data-toggle" => "collapse", :href => "#collapseFree"}
Free Stuff
%a.dropdown-item{"aria-controls" => "collapseNew", "aria-expanded" => "false", "data-toggle" => "collapse", :href => "#collapseNew"}
New Stuff
#collapseFree.collapse
..
#collapseNew.collapse
..