Need of a new option in droppable
Suppose, if we have a series of girds and want to know from which grid dragging is started, we can implement the following code, but I think there should be another option dealing this situation; though we have only two options ‘out’ and ‘over’, and can use them.
- var droppableStart = '';
- $("#draggable").draggable({
- start: function(){
- droppableStart = '';
- }
- });
- $(".gridArea").droppable({
- tolerance: 'intersect',
- over: function() {
- if(droppableStart == ''){
- droppableStart = $(this).attr('id');
- }
- },
- drop: function() {
- alert(droppableStart);
- }
- });