You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+15-17Lines changed: 15 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -33,40 +33,38 @@ Please note: every `<li>` must have either one or two direct children, the first
33
33
34
34
<dl>
35
35
<dt>tabSize</dt>
36
-
<dd>How far right or left (in pixels) the item has to travel in order to be nested or to be sent outside its current list. Default: **20**</dd>
36
+
<dd>How far right or left (in pixels) the item has to travel in order to be nested or to be sent outside its current list. Default: <b>20</b></dd>
37
37
<dt>disableNesting </dt>
38
-
<dd>The class name of the items that will not accept nested lists. Default: **ui-nestedSortable-no-nesting**</dd>
38
+
<dd>The class name of the items that will not accept nested lists. Default: <b>ui-nestedSortable-no-nesting</b></dd>
39
39
<dt>errorClass </dt>
40
-
<dd>The class given to the placeholder in case of error. Default: **ui-nestedSortable-error**</dd>
40
+
<dd>The class given to the placeholder in case of error. Default: <b>ui-nestedSortable-error</b></dd>
41
41
<dt>listType </dt>
42
-
<dd>The list type used (ordered or unordered). Default: **ol**</dd>
42
+
<dd>The list type used (ordered or unordered). Default: <b>ol</b></dd>
43
43
<dt>maxLevels </dt>
44
-
<dd>The maximum depth of nested items the list can accept. If set to '0' the levels are unlimited. Default: **0**</dd>
44
+
<dd>The maximum depth of nested items the list can accept. If set to '0' the levels are unlimited. Default: <b>0</b></dd>
45
45
</dl>
46
46
47
47
## Custom Methods
48
48
49
49
<dl>
50
50
<dt>serialize</dt>
51
-
<dd>Serializes the nested list into a string like **setName[item1Id]=parentId&setName[item2Id]=parentId**, reading from each item's id formatted as 'setName_itemId' (where itemId is a number).
52
-
It accepts the same options as the original Sortable method (**key**, **attribute** and **expression**).</dd>
51
+
<dd>Serializes the nested list into a string like <b>setName[item1Id]=parentId&setName[item2Id]=parentId</b>, reading from each item's id formatted as 'setName_itemId' (where itemId is a number).
52
+
It accepts the same options as the original Sortable method (<b>key</b>, <b>attribute</b> and <b>expression</b>).</dd>
53
53
<dt>toArray</dt>
54
54
<dd>Builds an array where each element is in the form:
55
-
```
56
-
setName[n] =>
55
+
<pre>setName[n] =>
57
56
{
58
57
'item_id': itemId,
59
58
'parent_id': parentId,
60
59
'depth': depth,
61
60
'left': left,
62
61
'right': right,
63
62
}
64
-
```
65
-
It accepts the same options as the original Sortable method (**attribute** and **expression**) plus the custom ** startDepthCount**, that sets the starting depth number (default is **0**).</dd>
63
+
</pre>
64
+
It accepts the same options as the original Sortable method (<b>attribute</b> and <b>expression</b>) plus the custom <b>startDepthCount</b>, that sets the starting depth number (default is <b>0</b>).</dd>
66
65
<dt>toHierarchy</dt>
67
66
<dd>Builds a hierarchical object in the form:
68
-
```
69
-
'0' ...
67
+
<pre>'0' ...
70
68
'id' => itemId
71
69
'1' ...
72
70
'id' => itemId
@@ -77,8 +75,8 @@ setName[n] =>
77
75
'id' => itemId
78
76
'2' ...
79
77
'id' => itemId
80
-
```
81
-
Similarly to `toArray`, it accepts **attribute** and **expression** options.</dd>
78
+
</pre>
79
+
Similarly to <code>toArray</code>, it accepts <b>attribute</b> and <b>expression</b> options.</dd>
0 commit comments