【发布时间】:2015-12-11 19:39:45
【问题描述】:
我有一个 id agenda_tbl 的表格,它是 ajax 响应的形式。该表的行是从 while 循环中创建的。
<table id="agenda_tbl">
<thead>......</thead>
<tbody>
<tr>
<td>Data1</td>
<td>Data2</td>
<td>Data3</td>
<td>Data3</td>
<td><input type="button" class="approve_btn"</td>
</tr>
<tr>
.........
</tr>
</table>
上表的CSS
#agenda_tbl
{
margin-top:5px;
border-collapse: collapse;
font-size: 12px;
}
#agenda_tbl td
{
border:1px solid black;
padding:3px;
}
我已经为第一页的按钮编写了点击事件。当我点击按钮时,我需要完全隐藏当前行。我已经用下面的jquery做到了。
$(document).on('click','.approve_btn',function(e)
{
var element = $(this);
if(confirm('Do you approve this agenda?'))
{
element.closest('tr').remove();
//this hides the current row.Also used hide(),made html() of row
//to empty.But doesnt work
}
});
这个脚本对我来说可以正常工作,但是相邻行的边框丢失了。我用谷歌搜索了很多,但找不到解决方案。
【问题讨论】:
-
在什么浏览器中?我在 Chrome 中有这个小提琴没有显示你的问题:jsfiddle.net/mplungjan/4Lubz94u
-
在 mozilla.lemme 中检查这个在 chrome @mplungjan
-
在 FX 31v 中,在某些情况下我会得到更厚的边框
-
在 chrome 中完美运行。lemme 更新 firefox。如何移除较厚的框架??
标签: jquery border-layout