jQuery EasyUI API 中文文档 - Draggable 可拖拽_jquery

WBOY
Release: 2016-05-16 18:01:40
Original
1057 people have browsed it

用$.fn.draggable.defaults重写默认的defaults。
用法

复制代码代码如下:


title



复制代码代码如下:

$('#dd').draggable({
handle:'#title'
});

特性

名称

类型

说明

默认值

proxy

string,function

拖拽时要使用的代理元素,设置为'clone'时,克隆元素将被用作代理。如果指定一个函数,它必须返回一个jQuery对象。

null

revert

boolean

如果设为true,拖拽结束后元素将返回它的开始位置。

false

cursor

string

拖拽时的css光标(cursor)。

move

deltaX

number

拖拽的元素相对于当前光标的位置的X

null

deltaY

number

拖拽的元素相对于当前光标的位置的Y

null

handle

selector

启动draggable的处理(handle)。

null

disabled

boolean

设为true就停止draggable

false

edge

number

能够在其中开始draggable.的拖拽宽度。

0

axis

string

定义拖拽元素可在其上移动的轴,可用的值是'v''h',当设为null,将会沿着'v''h'的方向移动。

null

事件

名称

参数

说明

onBeforeDrag

e

拖拽前触发,返回false就取消拖拽。

onStartDrag

e

目标对象开始拖拽时触发。

onDrag

e

拖拽期间触发。返回false将不做真正的拖拽。

onStopDrag

e

拖拽停止时触发。

方法

名称

参数

描述

options

none

返回选项(options)属性(property)。

proxy

none

如果设置了代理(proxy)属性就返回代理(proxy)。

enable

none

启用拖拽动作。.

disable

none

禁用拖拽动作。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!