You are using collapse on the div inside of your table row (tr). So when you collapse the div, the row is still there. You need to change it to where your id and class are on the tr instead of the div.
Change this:
<tr><td><div class="collapse out" id="collapseme">Should be collapsed</div></td></tr>
to this:
<tr class="collapse out" id="collapseme"><td><div>Should be collapsed</div></td></tr>
JSFiddle: http://jsfiddle.net/KnuU6/21/
EDIT: If you are unable to upgrade to 3.0.0, I found a JQuery workaround in 2.3.2:
Remove your data-toggle and data-target and add this JQuery to your button.
$(".btn").click(function() {
if($("#collapseme").hasClass("out")) {
$("#collapseme").addClass("in");
$("#collapseme").removeClass("out");
} else {
$("#collapseme").addClass("out");
$("#collapseme").removeClass("in");
}
});
JSFiddle: http://jsfiddle.net/KnuU6/25/
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…