0
我想在Thymeleaf按鈕點擊實現一個簡單的Bootstrap 3摺疊元素。我做了以下內容:Bootstrap的3按鈕在Thymeleaf點擊收起
<button data-toggle="collapse" th:attr="data-target='#demo'">click</button>
<div id="demo" class="collapse">
hello
</div>
但是,儘管包含Bootstrap的js和css文件,但單擊按鈕並不會執行任何操作。我使用的語法是否正確?
謝謝您的回答! :)我使用的Thymeleaf除Bootstrap之外還有特定的語法,因此我感到困惑。我試過只使用Bootstrap語法,但那也沒有工作:( – qwerty
噢對不起..我很糟糕。 –