Connor
Connor

Reputation: 4168

jQuery UI draggable into sortable

When I'm dragging an element from a draggable into a sortable, how do I change the amount of space the sortable elements drop down to make room for the draggable element to be dropped there? Right now, it defaults to the size of my sortable handle (16px), but I'd like to make it about 100px or so.

Thank you!

Upvotes: 2

Views: 295

Answers (1)

RoccoC5
RoccoC5

Reputation: 4213

You can style the placeholder element by adding a custom CSS class to it:

.myPlaceHolderClass { height: 100px !important; }

$('#sortable').sortable('option', 'placeholder', 'myPlaceHolderClass');

Upvotes: 2

Related Questions