View Single Post
Old 05-03-2012, 07:58 PM   PM User | #1
scottlafoy
New to the CF scene

 
Join Date: Apr 2012
Posts: 5
Thanks: 2
Thanked 0 Times in 0 Posts
scottlafoy is an unknown quantity at this point
Help with closing Jquery dialog

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?
scottlafoy is offline   Reply With Quote