I want to use jquery draggable/droppable to let the user select a group of objects (each one has a checkbox in the corner) and then drag all the selected objects as a group…
I can’t figure out for the life of me how to do it haha.
Here is what I’m thinking will lead to a usable solution, on each draggable object, use the start() event and somehow grab all the other selected objects and add them to the selection
I was also considering just making the dragged object look like a group of objects (they’re images, so a pile of photos maybe) for performance reasons. I think using the draggable functionality might fall over if you drag several dozen objects at once, does that sound like a better idea?
You could use the draggable’s
helperoption to drag groups of items.For example, if your draggables have checkboxes, you can return the selected items from the helper function like so:
Demo
I’ve setup a demo with draggable images with checkboxes and somewhat fluid layout. Click “Run Code Snippet” at the bottom to see the result: