JQuery Easyui API Chinese document-draggable can drag _jquery

Source: Internet
Author: User
Overrides the default defaults with $.fn.draggable.defaults.
Usage
Copy Code code as follows:

<div id= "dd" style= "width:100px;height:100px;" >
<div id= "title" style= "background: #ccc;" >title</div>
</div>

Copy Code code as follows:

$ (' #dd '). Draggable ({
Handle: ' #title '
});

Characteristics

Name

Type

Description

Default value

Proxy

String,function

The proxy element to use when dragging, when set to ' clone ' , the clone element will be used as the proxy. If you specify a function, it must return a jQuery object.

Null

Revert

Boolean

If set to true, the element will return to its starting position when the drag ends.

False

Cursor

String

Drag-and-drop CSS cursor (cursor).

Move

DeltaX

Number

The X that drags the element relative to the position of the current cursor .

Null

DeltaY

Number

The Y of the dragged element relative to the position of the current cursor .

Null

Handle

Selector

Initiates the processing of draggable (handle).

Null

Disabled

Boolean

Set to true to stop draggable.

False

Edge

Number

Be able to start draggable in them. Drag-and-drop width.

0

Axis

String

Defines the axis on which the dragged element can be moved, the available value is ' V ' or ' H ', and when set to null, it moves along the direction of ' V ' and ' H ' .

Null

Event

Name

Parameters

Description

Onbeforedrag

E

Drag before triggering, return false to cancel drag.

Onstartdrag

E

Triggered when the target object starts dragging.

Ondrag

E

Drag-and-drop period triggered. Return false will not do real drag.

Onstopdrag

E

Drag to trigger when stopping.

Method

Name

Parameters

Describe

Options

None

Returns the optionsproperty.

Proxy

None

Returns the proxy if theProxyproperty is set.

Enable

None

Enable drag and drop actions. .

Disable

None

Disables drag and drop actions.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.