Skip to content

Commit a1015e2

Browse files
authored
Update README.md
1 parent 415506b commit a1015e2

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

README.md

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -521,19 +521,16 @@ The distance (in pixels) the mouse must be from an empty sortable while dragging
521521

522522
Demo: https://jsbin.com/becavoj/edit?js,output
523523

524-
Instead of this, you can just set a padding on your list when it is empty. Warning, for :empty to work, it must have no node inside (even text one).
525-
(It will help if your lists are side-by-side, since you only want the drag occurs when you are under the list - not at the left)
526-
527-
Adding a CSS rule :
524+
An alternative to this option would be to set a padding on your list when it is empty.
525+
For example:
528526
`ul:empty {
529-
background:pink;
530-
padding-bottom:3em;
527+
padding-bottom: 20px;
531528
}`
532529

533-
And rewriting the empty list as : `<ul id="list2" class="list-group"></ul>` (so that it is really empty)
530+
Warning: For :empty to work, it must have no node inside (even text one).
534531

535-
You got :
536-
https://jsbin.com/galujuvayi/edit?html,css,js,output
532+
Demo:
533+
https://jsbin.com/yunakeg/edit?html,css,js,output
537534

538535
---
539536
### Event object ([demo](https://jsbin.com/fogujiv/edit?js,output))

0 commit comments

Comments
 (0)