GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - Barrior/DDSort: A simple, lightweight drag and drop sorting plugin of jQuery.

This repository was archived by the owner on Mar 27, 2020. It is now read-only.
BranchesTags
Open more actions menu

Latest commit

 

History

37 Commits
37 Commits

Folders and files

NameName
Last commit message
Last commit date
img
img
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 
ddsort.js
ddsort.js
 
 
ddsort.min.js
ddsort.min.js
 
 
demo.html
demo.html
 
 
demo_bootstrap.html
demo_bootstrap.html
 
 
demo_modal.html
demo_modal.html
 
 
demo_multi_direction.html
demo_multi_direction.html
 
 
index.html
index.html
 
 

Repository files navigation

DDSort

一个轻简的 jQuery 拖放排序插件,支持移动端。

● 漂亮的UI展示:

DDSort

● 使用方法:

1、假设 Html 结构如下:

<div class="wrap">
    <ul>
        <li>...</li>
        <li>...</li>
        ...
    </ul>
</div>

2、依次引入 jquery.js 和 ddsort.js,然后使用 DDSort API 实现如图拖放排序效果:

$( '.wrap' ).DDSort({
    
    // 示例而用,默认即 li
    target: 'li',

    // 示例而用,默认有一定的样式    
    floatStyle: {    
        'border': '1px solid #ccc',
        'background-color': '#fff'
    }
});

3、如果拖放列表带有滚动条,那么 $( '.wrap' ) 要是这个滚动条的元素。

● 详细API

DDSort 方法接受一个 JSON 对象类型的参数,以下是对这个参数的描述。

参数列表 类型 描述
target string 可选,插件内部使用的是 jQuery 的 on 方法绑定的事件,此参数就是 on 方法上的选择器字符串,默认 li
delay number 可选,延迟拖拽,默认延时 100 毫秒
cloneStyle object 可选,设置占位符元素的样式
floatStyle object 可选,设置拖动元素的样式
down function 可选,鼠标按下时执行的函数
move function 可选,鼠标移动时执行的函数
up function 可选,鼠标抬起时执行的函数
● 下载

Download

● Bootstrap 上的拖拽问题

请参考 demo_bootstrap.html

About

A simple, lightweight drag and drop sorting plugin of jQuery.

barrior.github.io/DDSort/

Topics

ddsortjqueryjquery-pluginjquery-sortsortsorting

Resources

Readme
Activity

Stars

103 stars

Watchers

1 watching

Forks

59 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.