It seems the drop event is not triggering when I would expect.
I assume that the drop event fires when an element that is being dragged is releases above the target element, but this doesn't seem to the the case.
What am I misunderstanding?
http://jsfiddle.net/LntTL/
$('.drop').on('drop dragdrop',function(){
alert('dropped');
});
$('.drop').on('dragenter',function(){
$(this).html('drop now').css('background','blue');
})
$('.drop').on('dragleave',function(){
$(this).html('drop here').css('background','red');
})
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…