1. Editable:
<Div id = "move" contentEditable = "true"> editable </div>
Setting the contentEditable attribute enables div programming to be editable.
2. Drag:
$ ('# Move'). draggable ();
The draggable of jQuery UI enables the div to be dragged, but if the two attributes are applied at the same time, the Editable function becomes invalid.
3. editable and scalable:
Copy codeThe Code is as follows:
<Div id = "move" contentEditable = "true"> editable </div>
Var divTitle = $ ('# move ');
[Code]
<Span style = "font-size: 18px"> divTitle. draggable (). click (function ()
{
$ (This). draggable ({disabled: false });
Certificate (this).css ('backgroundcolor', 'transparent ');
}). Dblclick (function ()
{
$ (This). draggable ({disabled: true });
Certificate (this).css ('backgroundcolor', '# ffff6f ');
}); </Span>
In this way, the div can have both the edit and drag attributes.