INT
INT

Reputation: 912

Constrain jQuery nestedSortable items (that's being dragged) within container?

I'm looking into if it's possible to have nestedSortable items to be force kept within it's container while items are being dragged. As it is now, if you grab an item and pull it sideways you'll be able to drag it, basically, offscreen if you want. I'm wondering if it's possible to restrict this in someway?

Here's a video on how I want it to function: http://dl.dropbox.com/u/3618143/drag.mov

And here's a demo (try to drag horizontally and you'll see what I mean): http://jsfiddle.net/uzRGB/

Upvotes: 0

Views: 707

Answers (1)

Evan Davis
Evan Davis

Reputation: 36592

http://jqueryui.com/demos/sortable/#option-containment ...?

EDIT: now with updated fiddle! http://jsfiddle.net/uzRGB/2/

Upvotes: 2

Related Questions