revert after dropping a draggable, only if out of bounds

J

Jeremy Blah

Hi, I have a div tag as a “container†for all my draggable objects… My
goal is to be able to decide whether to revert these objects based on
where they are dropped. If they are “out of boundsâ€, or not in the
container after they’ve been dropped, I want them to revert, otherwise,
drop normally.

I currently have a few JS functions setup that calculate the boundries
of the container, and alert me on mouseup… true if they’ve been dropped
outside of the container, and false if they’ve been dropped inside the
container.

By default, the droppable object is not set to revert… How would I go
about making this object revert only if it’s been dropped outside of the
container?

Thanks ahead of time for any help…
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,215
Messages
2,571,113
Members
47,710
Latest member
HarleyMoli

Latest Threads

Top