How do I collapse a table row in Bootstrap?

前端 未结 6 917
予麋鹿
予麋鹿 2020-12-13 18:29

I am using Bootstrap 2.3.2 in my app and I need to completely hide a row using the collapse plugin. Below is an example:




        
6条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-13 18:52

    Which version of Bootstrap are you using? I was perplexed that I could get @Chad's solution to work in jsfiddle, but not locally. So, I checked the version of Bootstrap used by jsfiddle, and it's using a 3.0.0-rc1 release, while the default download on getbootstrap.com is version 2.3.2.

    In 2.3.2 the collapse class wasn't getting replaced by the in class. The in class was simply getting appended when the button was clicked. In version 3.0.0-rc1, the collapse class correctly is removed, and the collapses.

    Use @Chad's solution for the html, and try using these links for referencing Bootstrap:

    
    
    

提交回复
热议问题