DIV is a box model. It is a container. This label is often used in the layout process. In this article, you will learn how to make DIV editable and scalable, for more information, see.
1. Editable:
Editable
Setting the contentEditable attribute enables p programming to be editable.
2. Drag:
$ ('# Move'). draggable ();
The draggable of jQuery UI enables p to be dragged. However, if two attributes are applied at the same time, the Editable function becomes invalid.
3. editable and scalable:
The Code is as follows:
Editable
Var pTitle = $ ('# move ');
[Code]
PTitle. draggable (). click (function ()
{
$ (This). draggable ({disabled: false });
Certificate (this).css ('backgroundcolor', 'transparent ');
}). Dblclick (function ()
{
$ (This). draggable ({disabled: true });
Certificate (this).css ('backgroundcolor', '# ffff6f ');
});
In this way, p can have both the edit and drag attributes.