我有两个 ID 为 sample1 和 sample2 的表。sample1 包含<th class="header">
并且 sample2 包含<td class="desc">
. 我想做的就是当我<th>
在 sample1 中调整大小时,它也应该<td>
在 sample2 中以相同的同步自动调整大小。我正在使用 jQueryresizeable()
方法,但我没有得到它。
请帮忙。
这是供参考的代码:
<script type="text/javascript" charset="utf-8">
$(function() {
$("#sample1 .header").resizable();
$("#sample2 .desc").resizable();
});
</script>
</head>
<body>
<div class="center" >
<table id="sample1" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<th class="header">header</th><th class="header">header</th>
</tr>
</table>
<table id="sample2" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td class="desc">cell</td>
<td class="desc">cell</td>
</tr>
<tr>
<td class="desc">cell</td>
<td class="desc">cell</td>
</tr>
<tr>
<td class="desc">cell</td>
<td class="desc">cell</td>
</tr>
</table>
</div>
</body>
</html>