Skip to content

Instantly share code, notes, and snippets.

@jakearchibald
Created October 26, 2009 09:20
Show Gist options
  • Save jakearchibald/218531 to your computer and use it in GitHub Desktop.
Save jakearchibald/218531 to your computer and use it in GitHub Desktop.
var mySortable = new glow.widgets.Sortable('#mySortable', {
onSort : function () {
// this will contain the IDs of the items in the sortable, in order
var itemIds = [];
// get the children of the sortable containers - these are the items you drag
// Then sort them, and get the ID for each
mySortable.containers.children().sort().each(function () {
itemIds.push( this.id );
});
// itemIds contains an array of all the ids of the list items in order
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment