Hi there, there is no way of canceling a drop when the user has actively started a drag, since this would be unnatural behaviour (after all, the user should have a mouseup before the sortable stops).
However, I think what you'll want is to disable certain nodes, sou you can't drop before or after them. Thast is actually quite easy - simply give these nodes a certain class, let's say "disabled", and then set the option "items" to "not(.disabled)". On Wed, Oct 15, 2008 at 6:09 AM, William Chang <[EMAIL PROTECTED]>wrote: > > Let me give you all an example, you have a sortable list and you don't > want any items to be dragged to the top row. Thus, the top row of the > list is forbidden. When you drag the item it should not let you drop > it on the first row, instead revert the item to it's original > position. > > I still have not found a solution of preventing the item from being > dropped using jQuery UI sortable??? Please help. > > By the way, the example I wrote is not exactly what the interface is > doing, but just an abstract example of a complicated user interface > I'm making. > > Thanks, > Will > > On Oct 14, 6:50 pm, William Chang <[EMAIL PROTECTED]> wrote: > > I'm using jQuery UI Sortable and I'm trying to figure out how to > > cancel the drop or prevent the drop at certain areas? I know the > > events are being fired, onChange and onUpdate, and I tried doing a > > "return false" to denied the drop and tell the draggable to go back > > where it came from. > > > > Please help. > > > > Thanks, > > Will > > > -- Paul Bakaus UI Architect -- http://paulbakaus.com http://www.linkedin.com/in/paulbakaus --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery UI" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/jquery-ui?hl=en -~----------~----~----~----~------~----~------~--~---
