Hi all! I have some draggables objects that I can drop them on another one When I drop an element I need to ask for confirmation At this point the draggable object follow the cursor to the confirm dialog How can I stop the draggable to follow the cursor? I try to create a system where you can remove an object by dragging it to the garbage Thanks a lot! -- Mis Cosas http://blogs.sistes.net/Garito/
-----Original Message----- How can I stop the draggable to follow the cursor? ----- You can run your confirmation script after a timeout. For example: function sure() { conf = confirm("Are you sure?"); if(!conf) { return false; } } Sortable.create(''thelist'',{endeffect: function(element) { setTimeout("sure()", 250);}});
Leon Chevalier escribió:> -----Original Message----- > How can I stop the draggable to follow the cursor? > > ----- > > You can run your confirmation script after a timeout. For example: > > function sure() { > conf = confirm("Are you sure?"); > if(!conf) { > return false; > } > } > > Sortable.create(''thelist'',{endeffect: function(element) { > setTimeout("sure()", 250);}}); > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >Sortable? Need to stop the dragg effect isn''t it? Thanks! -- Mis Cosas http://blogs.sistes.net/Garito/
-----Original Message----- Sortable? Need to stop the dragg effect isn''t it? -------- A sortable adds a drag to each of its elements, so it''s the same.>From "dragdrop2_test.html" in scriptaculous-js-1.x.x\test\functionalfunction sure() { conf = confirm("Are you sure?"); if(!conf) { return false; } } new Draggable(''revertbox1'',{handle:''handle1'',revert:function(element){return ($(''shouldrevert1'').checked)},endeffect: function(element) { setTimeout("sure()", 250);}});
Leon Chevalier escribió:> -----Original Message----- > Sortable? > Need to stop the dragg effect isn''t it? > > -------- > > A sortable adds a drag to each of its elements, so it''s the same. > > >From "dragdrop2_test.html" in scriptaculous-js-1.x.x\test\functional > > function sure() { > conf = confirm("Are you sure?"); > if(!conf) { > return false; > } > } > > new Draggable(''revertbox1'',{handle:''handle1'',revert:function(element){return > ($(''shouldrevert1'').checked)},endeffect: function(element) { > setTimeout("sure()", 250);}}); > > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >A!!! Now I understand what you saying!!!!!!!! Revert option depends on the result of the confirmation dialog!! Sure??? Hehehehe, Thanks so much!!! -- Mis Cosas http://blogs.sistes.net/Garito/