2012-09-13 28 views
0

我想問問,如果可能掛鉤排序表元素。下面是結構。我讀的元素不工作,我的測試一直沒有成功:jQuery UI的可排序使用一個表

<table id="photoPreviews"><tr> 
<td>... other elements here</td> 
<td>... other elements here</td> 
<td>... other elements here</td> 
<td>... other elements here</td></tr><tr> 
<td>... other elements here</td> 
<td>... other elements here</td> 
<td>... other elements here</td> 
<td>... other elements here</td> 
</tr></table> 

視覺上看起來是這樣的:

enter image description here

三江源

回答

1

一個HTML <table>真的應該只用於表格數據......除非一切都失敗。

在這種情況下,您最好使用<ul>。喜歡的東西:

<ul id='photoPreviews'> 
<li>Other elements go here. . .</li> 
<li>Other elements go here. . .</li> 
<li>Other elements go here. . .</li> 
<li>Other elements go here. . .</li> 
</ul> 

之後,只要按照高級功能jquery sortable文檔。

祝你好運!

+0

非常感謝UL /李偉大的工作... :) – Adam