Guest User

Untitled

a guest
Apr 25th, 2012
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. jQuery UI drop event of droppable fires on sortable
  2. $('#sortable').sortable().droppable({
  3. // Drop should only fire when a draggable element is dropped into the sortables,
  4. // and NOT when the sortables themselves are sorted (without something being dragged into).
  5. drop: function(ev, ui){
  6. $(ui.draggable).html('<div>TEMPLATE</div>');
  7. }
  8. });
  9. $('#draggables li').draggable({
  10. connectToSortable: '#sortable',
  11. helper: 'clone',
  12. revert: 'invalid',
  13. cursor: 'move'
  14. });​
Advertisement
Add Comment
Please, Sign In to add comment