I have a jquery dialog that contains a few fields the close button and some images. When I press the close button or 'X' it works as expected. What I am trying to do is when the dialog is showing and the user clicks on one of the images it runs some javascript and in this javascript I also want to close the dialog.
I am trying:
Code:
$('#dialog-content').dialog('close');
from the function that is being called outside of the dialog. and the function does what it is supposed to but the dialog never closes.
The id of the div i am running as a dialog is 'dialog-content'.
Any suggestions?