How to make Twitter Bootstrap Collapse work on dynamically loaded html using ajax

后端 未结 3 1574
一向
一向 2021-02-14 12:32

I am loading html using ajax call, this html has Bootstrap Collapse. The issue is Collapse is not working, if you click it wil

3条回答
  •  你的背包
    2021-02-14 13:08

    i would suggest you to call

     $(".collapse").collapse() 
    

    inside the ajax's success function after the dynamic html is appended.

提交回复
热议问题