【发布时间】:2014-02-24 19:44:08
【问题描述】:
我正在使用Twitter Bootstrap collapse 函数来隐藏表格行。我在触发折叠/展开的跨度内的文本中也有一个链接。不幸的是,当我点击链接时,折叠的文本首先展开,然后链接。
我希望能够在单击链接时跳过触发折叠切换。下面是一些演示该问题的代码 (live jsfiddle example here):
<table class="table">
<tr data-toggle="collapse" data-target="#collapseRow1" style="cursor: pointer;">
<td>Click me to show more!</td>
<td><a href="http://getbootstrap.com/css/">but don't expand after clicking this link</a></td>
</tr>
<tr class="collapse" id="collapseRow1">
<td>hidden content1</td>
<td />
</tr>
</table>
【问题讨论】:
标签: javascript jquery html css twitter-bootstrap