jQuery EasyUI API Chinese Documentation - Draggable Draggable_jquery
Override the defaults with $.fn.draggable.defaults.
Usage
$('#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 |
Enable drag action. . |
disable |
none |
Disable drag action. |

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

How to use Layui to implement drag-and-drop data visualization dashboard function Introduction: Data visualization is increasingly used in modern life, and the development of dashboards is an important part of it. This article mainly introduces how to use the Layui framework to implement a drag-and-drop data visualization dashboard function, allowing users to flexibly customize their own data display modules. 1. Preparation to download the Layui framework. First, we need to download and configure the Layui framework. You can download it on Layui’s official website (https://www

How to use Layui to implement draggable tab component function Layui is a lightweight front-end UI framework that provides rich components and convenient APIs, making front-end development simpler and more efficient. Among them, the tab component is one of the commonly used functions in Layui. In actual development, we often encounter the need to drag and drop tabs to sort or drag to transpose them. This article will introduce how to use Layui to implement the draggable tab component function in the form of examples. First, we need to introduce Layui related

Vue is a modern JavaScript framework. When implementing a visual editor, it can provide a rich set of components, instructions, life cycle hooks and other functions. It also provides some convenient APIs for the implementation of drag-and-drop interaction. In this article, we will introduce how to use Vue2.x to implement a drag-and-drop visual editor to facilitate web developers to quickly implement corresponding functions in their projects. Component structure First, we need to split the component structure of the visual editor, which usually consists of the following

How to use Layui to implement draggable paging function Introduction: In web development, paging function is one of the very common requirements. Layui is a lightweight front-end UI framework that provides a wealth of components and functions that can greatly simplify our development work. In this article, we will introduce how to use Layui to implement drag-and-drop paging function, and provide specific code examples for reference. 1. Basic usage of Layui Before starting, you first need to understand some basic usage methods of Layui. Layui core

Overview of how to use Layui to implement a draggable tree menu: Layui is a simple and easy-to-use front-end framework that provides a wealth of components and plug-ins to facilitate developers to quickly build pages. This article will introduce how to use Layui to implement a draggable tree menu function. We will use the tree component provided by Layui and expand it with a drag-and-drop plug-in to implement the drag-and-drop sorting function of the tree menu. Introducing related resources First, we need to introduce the relevant resource files of Layui, including the Layui framework file

With the continuous development of Web front-end technology, more and more developers are beginning to use the SPA (Single Page Application) architecture to build applications. As one of the most popular web front-end frameworks currently, Vue provides a rich component library and tools to make it easier to build SPA applications. Vue also provides some convenient solutions when it comes to implementing draggable layouts. 1. Use Vue-Grid-LayoutVue-Grid-Layout is a

How to use Layui to implement the drag-and-drop calendar component function 1. Introduction Layui is a lightweight web front-end framework that provides rich UI components and simple and easy-to-use API interfaces. In daily development, we often need to use calendar components to display and manage time information. This article will introduce how to use Layui's drag and drop function to implement a draggable calendar component. 2. Preparation Before starting, we need to do some preparations. Download the Layui framework First, we need to download the Layui framework

How to use Layui to implement drag-and-drop jigsaw puzzle functionality Jigsaw puzzles are a classic entertainment activity, and many web and mobile applications now offer versions of this game. In this article, we will introduce how to use the Layui framework to implement a drag-and-drop puzzle function and provide specific code examples. Layui is a lightweight front-end framework that provides a set of simplified interface components and rich interactive animation effects. Using the Layui framework, you can quickly develop beautiful and easy-to-use web applications. Fighting to achieve
