On 2/2/07, Markus Döbele <[EMAIL PROTECTED]> wrote:
> Hy jquery users,
> ...
> I have another problem now. I want to create a trash bin.
> When I drag an item in there and this draggable is set as "revert" its
> position still gets reverted and then its deleted.
> I would like to it gets reverted only when I place it outside the drop area.
>
> Is there a way to achieve this?
>
> This is what I try so far but the revert:false seems to be ignored:
>
> $('#backdrop').Droppable(
>                 {
>                         accept :                'items',
>                         tolerance:      'intersect',
>                         ondrop:         function(drag)
>                         {
>
>                                 $('.items').Draggable(
>                                 {
>                                         revert:         false
>                                 }
>                                 );
>                                 $(drag2).remove();
>                         }
>                 }
>                 );
>
>         });

Try this, i tried it and it works:

$('#backdrop').Droppable(
                 {
                         accept :                'items',
                         tolerance:      'intersect',
                         ondrop:         function(drag)
                         {
                                 $.iDrag.hidehelper(drag);
                                 $(drag).remove();
                         }
                 }
                 );

         });

I hope that helps :)

Regards,
Riyono

-- 
----------------------------------------------------------------------
there's nothing impossible for an open mind
[EMAIL PROTECTED]
http://riyono.com/
----------------------------------------------------------------------
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to