How to make a div contenteditable and draggable
jquery, jquery-ui
Solution
$("#d").draggable()
.click(function() {
$(this).draggable({ disabled: false });
}).dblclick(function() {
$(this).draggable({ disabled: true });
});
āā
DEMO
Problem
``` <div contenteditable="true" id="d"> <span>Text to edit</span> </div> $("#d").draggable(); ``` I can only drag this div but how can i edit it (like on doubleclick editable property become active and on click dragging become active)?