Add buttons within plugin, return value
Hi
It displays ok first time, after that click on the button will not close the dialog.
I add buttons using append() method and remove them using either empty() or remove() method. The problem occurs when the buttons are removed and added again to a <div> container.
The other problem is how to return the users choice, ie which button they clicked - yes or no. I can bind click event of the button to a handler within plugin but I don't see the way to assign the value in an appropriate manner. - something like var result = $(selector).confirm(); .
I looked into onclose event but I haven't seen anything obvious to help me.
I am not posting entire plugin code here to keep the post short, but I will do it if required.
Any help with these problems will be greatly appreciated.