Skip to content

Instantly share code, notes, and snippets.

@sdkester
Created November 19, 2010 03:01
Show Gist options
  • Save sdkester/676387 to your computer and use it in GitHub Desktop.
Save sdkester/676387 to your computer and use it in GitHub Desktop.
$(function() {
$("ul.droptrue").sortable({
connectWith: 'ul',
opacity: 0.6,
update : updatePostOrder
});
$("#sortable1, #sortable2").disableSelection();
$("#sortable1, #sortable2").css('minHeight',$("#sortable1").height()+"px");
updatePostOrder();
});
function updatePostOrder() {
var arr = [];
$("#sortable2 li").each(function(){
arr.push($(this).attr('id'));
});
$('#postOrder').val(arr.join(','));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment