Guest User

Untitled

a guest
Apr 23rd, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. var mySortable = new glow.widgets.Sortable('#mySortable', {
  2. onSort : function () {
  3. // this will contain the IDs of the items in the sortable, in order
  4. var itemIds = [];
  5.  
  6. // get the children of the sortable containers - these are the items you drag
  7. // Then sort them, and get the ID for each
  8. mySortable.containers.children().sort().each(function () {
  9. itemIds.push( this.id );
  10. });
  11.  
  12. // itemIds contains an array of all the ids of the list items in order
  13. }
  14. });
Add Comment
Please, Sign In to add comment