@@ -8,7 +8,7 @@ Demo: http://rubaxa.github.io/Sortable/
8
8
9
9
* Supports touch devices and [ modern] ( http://caniuse.com/#search=drag ) browsers
10
10
* Can drag from one list to another or within the same list
11
- * Animation moving items when sorting (css animation)
11
+ * CSS animation when moving items
12
12
* Supports drag handles * and selectable text* (better than voidberg's html5sortable)
13
13
* Built using native HTML5 drag and drop API
14
14
* Supports [ AngularJS] ( #ng ) and and any CSS library, e.g. [ Bootstrap] ( #bs )
@@ -30,13 +30,15 @@ var el = document.getElementById('items');
30
30
var sortable = Sortable .create (el);
31
31
```
32
32
33
+ You can use any element for the list and its elements, not just ` ul ` /` li ` . Here is an [ example with ` div ` s] ( http://jsbin.com/luxero/2/edit?html,js,output ) .
34
+
33
35
34
36
---
35
37
36
38
37
39
### Options
38
40
``` js
39
- var sortabel = new Sortable (el, {
41
+ var sortable = new Sortable (el, {
40
42
group: " name" , // or { name: "..", pull: [true, false, clone], put: [true, false, array] }
41
43
sort: true , // sorting inside list
42
44
store: null , // @see Store
@@ -89,7 +91,7 @@ which is an area of every list element that allows it to be dragged around.
89
91
90
92
``` js
91
93
var sortable = new Sortable (el, {
92
- handle: " .my-handle" ,
94
+ handle: " .my-handle"
93
95
});
94
96
```
95
97
@@ -114,9 +116,9 @@ var sortable = new Sortable(el, {
114
116
To drag elements from one list into another, both lists must have the same ` group ` value.
115
117
You can also define whether lists can give away, give and keep a copy (` clone ` ), and receive elements.
116
118
117
- * name:` string ` — group name
118
- * pull:` true|false|'clone' ` — ability to move from the list. ` clone ` — cloning drag item when moving from the list .
119
- * put:` true|false|["foo", "bar"] ` — the possibility of adding an element from the other list , or an array of names groups, which can be taken.
119
+ * name: ` String ` — group name
120
+ * pull: ` true|false|'clone' ` — ability to move from the list. ` clone ` — copy the item, rather than move .
121
+ * put: ` true|false|["foo", "bar"] ` — whether elements can be added from other lists , or an array of group names from which elements can be taken
120
122
121
123
122
124
---
@@ -250,7 +252,7 @@ Sortable.create(el, {
250
252
251
253
<a name =" bs " ></a >
252
254
### Bootstrap
253
- Demo: http://jsbin.com/luxero/1 /edit
255
+ Demo: http://jsbin.com/luxero/2 /edit?html,js,output
254
256
255
257
``` html
256
258
<!-- Latest compiled and minified CSS -->
@@ -274,7 +276,7 @@ Demo: http://jsbin.com/luxero/1/edit
274
276
// Simple list
275
277
Sortable .create (simpleList, { /* options */ });
276
278
</script >
277
-
279
+ ```
278
280
279
281
---
280
282
@@ -299,7 +301,7 @@ Demo: http://jsbin.com/luxero/1/edit
299
301
300
302
301
303
## MIT LICENSE
302
- Copyright 2013 Lebedev Konstantin <ibnRubaXa @gmail.com >
304
+ Copyright 2013
-2014 Lebedev Konstantin
< [email protected] >
303
305
http://rubaxa.github.io/Sortable/
304
306
305
307
Permission is hereby granted, free of charge, to any person obtaining
0 commit comments