jQuery draggable and revert with delay -


i trying add delay between when user drags , drops div, , when div reverts back.

revertduration controls speed of div reverting back, want delay before happens.

i quite unfamiliar jquery, spending time trying work out , seems should pretty straight-forward.

here jquery: $( "#draggable" ).draggable({ revert: true , revertduration: 1000 });

and here fiddle http://jsfiddle.net/yxbp9/54/

thank much

-e

is not simple seems.

the way found use function in revert option , use jquery delay wait time, dealy build other purposes (queue , animation) in case working fine.

code:

$("#draggable").draggable({     revert: function () {         $(this).delay(5000);         return true     },     revertduration: 1000 }); 

demo: http://jsfiddle.net/irvindominin/qgtf5/


Comments

Popular posts from this blog

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -

php - Magento - Deleted Base url key -

android - How to disable Button if EditText is empty ? -