你可以只使用jQuery的做一個有點低級別的DOM操作。例如,移動框起來:
$('a.move-up').click(function(){
var prev = $(this).parent().prev(); // get the preceding element
var self = $(this).parent().clone(true); // copy the parent element, including all event handlers attached to itself and its children
$(this).parent().remove(); // remove the parent
prev.before(self); // place the parent before the preceding element to "move it up"
});
上述代碼假定下面的標記,但可容易地適用於你可以具有任何其他標記($(this).parents('div')
例如)
<ul>
<li><a href="" class="move-up"></a></li>
...
</ul>
這僅僅是一個非常粗略的例子,你如何能夠實現這樣的結果。
你說你不想jQuery的拖放用戶界面,但你卻要拖放(從什麼我理解),你標記了你的問題jQuery和jquery-ui。或者等一下是不是錯字?或者我沒有正確地認識到你的問題? – Trufa 2010-12-07 22:48:22