Reputation: 16714
I'm trying to make a table with the th's of the header resizable.
Here you can see an example where I first try de resize with a div and then with a table (it works great). Then I try the resize with the th's of another table. Nothing happens.
Can the th's be resized using jquery UI??
Upvotes: 1
Views: 5531
Reputation: 11
I have done small tweak to force the size of the the during/after resize:
resize:function(event,ui){
ui.helper.parent().css('width',ui.size.width+'px');
}
Upvotes: 1
Reputation: 14967
try with:
html:
<table id="tblResize2">
<thead>
<tr>
<th width="100px"><div>a</div></th>
<th width="100px"><div>b</div></th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>2</td>
</tr>
<tr>
<td>1</td>
<td>2</td>
</tr>
<tr>
<td>1</td>
<td>2</td>
</tr>
</tbody>
</table>
js:
$("#tblResize2 th div").resizable();
Upvotes: 3