Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dragleave #540

Merged
merged 11 commits into from
Aug 15, 2020
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,15 @@ sortable('.sortable')[0].addEventListener('sortupdate', function(e) {
});
```

### sortenter

Fired when a dragitem enters a sortable container.

### sortleave

Fired when a dragitem leaves a sortable container.


## Options

### items
Expand Down Expand Up @@ -211,6 +220,15 @@ sortable('.sortable', {
});
```

### containerClass
Use `containerClass` option to apply a css Class to the container. The class is added when dragged item enters the container and removed when it leaves it (or is dropped).

``` javascript
sortable('.sortable', {
containerClass: 'container-hovered' // Defaults to false
});
```

### maxItems
Use the `maxItems` option to restrict the number of items that can be added to a sortable from a [connected](#connectwith) sortable. `maxItems` should always be combined with the `items` option. Make sure `items` does not match placeholder and other options, so that they are not counted.

Expand Down
Loading