[jQuery] jquery droppable propagation problem
hi,
i have a problem with nested divs and drag & drop...wenn i drag a
draggable on a droppable div (and the divs are nested --> one
droppable in another droppable) it calls the drop function for both
doppable divs (inner div and parent div)...how could i prevent this?
javascript part:
$(document).ready(function(){
$('div[class*=acceptable]').draggable( {
revert: true
});
$('div[class*=accepting]').droppable( {
drop: function(event, ui) {
alert($(this).attr('id'));
}
});
});
html part:
<div class="acceptable accepting" id="sub" style="background-
color:red; z-index:10;">
sub
<div class="acceptable accepting" id="sub1" style="background-
color:blue; z-index:11;">
sub1
<div class="acceptable accepting" id="sub2" style="background-
color:green; z-index:12;">
sub2
<div class="acceptable accepting" id="sub3" style="background-
color:brown; z-index:13;">
sub3
</div>
</div>
</div>
</div>
thanks