mirror of
https://github.com/typecho/typecho.git
synced 2025-03-26 04:42:28 +01:00
完美解决chrome的表格bug
This commit is contained in:
parent
42538c1a10
commit
c64683555c
@ -247,10 +247,15 @@ jQuery.tableDnD = {
|
||||
// fix chrome border bug
|
||||
if (0 == $('tfoot', this).length
|
||||
&& 0 < $('thead', this).length) {
|
||||
var h = $('thead', this), count = $('th', h).length;
|
||||
var h = $('thead', this), count = $('th', h).length,
|
||||
f = $('<tfoot><tr><td style="padding:0;height:0;line-height:0;border:none" colspan="' + count
|
||||
+ '"></td></tr></tfoot>').insertAfter(h),
|
||||
l = $('tr:last', this);
|
||||
|
||||
$('<tfoot><tr><td colspan="' + count
|
||||
+ '"></td></tr></tfoot>').insertAfter(h);
|
||||
if (l.parent().prop('tagName').toLowerCase() != 'tfoot') {
|
||||
var td = $('td', l), dh = td.height();
|
||||
td.height(dh - f.outerHeight());
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user