This might be a silly question to ask if I am missing a key point. I want to create a draggable which is resizable too. I don’t know what is the proper way to do it but I did something like this:
$('#MYID').resizable();
$('#MYID').draggable();
Now I want to move it to some position and when everything is finalized save the position using: $('#MYID').ui-position. I am not sure how to implement the callback function in this case. If I use callback in like this:
$('#MYID').resizable();
$('#MYID').draggable()(Function()({....callback code for ui-position})
This is okay if the user does not resize the draggable after placing it in one position but what if he does?
How can I set one callback happening after the completion of two events?
Have them both set a flag, and then use a conditional that if both flags are set call the completion function