Como capturar o evento dragend em javascript?
Eu estou tentando pegar o evento dragend em JavaScript para um DIV arrastável. O evento dragend não é disparado, por quê? e como resolver isso? PS, estou usando o método .draggable () de: jQuery UI 1.9.2
Aqui está meu código:http://jsfiddle.net/vBMav/
HTML:
<div id="divId"> ... </div>
CSS:
#divId {
background-color: #000000;
color: #ffffff;
height: 200px;
width: 200px;
}
Javascript:
$('#divId').draggable();
$('#divId')
.bind('dragstart', function(){ $("#divId").text("drag start"); })
.bind('drag', function(){ $("#divId").text("dragging"); })
.bind('dragend', function(){ $("#divId").text("drag ended"); });