dialog beforeClose event SOLVED
Hi
I feel first obligated to thank the entire community for an incredible open source product.
Secondly, I'm still getting my head wrapped around how the event model works for triggered events.
I am binding a global dialog close handler and I need to take some action on the dialog's contents before the dialog "goes away".
I have the handler in place, but am grasping at the event object passed. I need the ID of the original div that was used to create the dialog.... I'm trying something like this:
- beforeClose: function(e, ui) {
- alert($(e.currentTarget).parent().attr('id'));
- }
Can anyone shed some light on this?
The solution here is to pay attention:
- $(e.target)[0].id
This should return the id of the original div used to create the dialog.