jQueryUI droppable, stop propagation to overlapped sibling

前端 未结 9 909
忘了有多久
忘了有多久 2020-12-02 01:59

As you can see here: http://jsfiddle.net/rA4CB/6/

When I make the drop in the overlapped area it is received in both droppables, greedy doesn\'t work when the items

9条回答
  •  时光取名叫无心
    2020-12-02 02:29

    try greedy option in ui dropable. see the fiddle link below for demo:

    http://jsfiddle.net/creators_guru/3vT5C/embedded/result/

    $( ".circles" ).droppable({
        greedy: true,
        drop: function( event, ui ) {
            $_data  =   ('drgged class = ' + ui.draggable.attr('class'));
            $_data1 =   ('droped id = #' + $(this).attr('id'));
            $('#data').html($_data + '
    '+$_data1); return false; } });

提交回复
热议问题