Reputation: 20438
I'm trying to follow
http://www.foliotek.com/devblog/make-table-rows-sortable-using-jquery-ui-sortable/
And have created a very simple example
It's very straightforward and I'm stuck figuring out why my table is not sortable.
Upvotes: 0
Views: 711
Reputation: 16960
You're doing:
<script>$("#sort tbody").sortable().disableSelection();</script>
before the table has been added to the document. Call sortable
after the DOM has loaded:
<script>
$(function() {
$("#sort tbody").sortable().disableSelection();
});
</script>
Upvotes: 3