Ive been looking for this answer for hours, but I cant find it.
I am using Jquery UI and I would like to ALWAYS revert to original position if dropped or not.
If it is dropped, I would like it to execute the following code, ‘alert($(ui.draggable).attr(“id”));’
I know this answer is probably very easy, however i am struggling. Thank you very much for looking.
You can use the revert option and set it to true and also the handle callback function and do what you want in there
I’m not sure if these two will work together but you can give it a shot! By that I mean if revert is set to true I’m not sure if the drop handler will ever get called.