Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- jQuery UI drop event of droppable fires on sortable
- $('#sortable').sortable().droppable({
- // Drop should only fire when a draggable element is dropped into the sortables,
- // and NOT when the sortables themselves are sorted (without something being dragged into).
- drop: function(ev, ui){
- $(ui.draggable).html('<div>TEMPLATE</div>');
- }
- });
- $('#draggables li').draggable({
- connectToSortable: '#sortable',
- helper: 'clone',
- revert: 'invalid',
- cursor: 'move'
- });
Advertisement
Add Comment
Please, Sign In to add comment