Using the user interface dialog box. jquery 1.4.2
I have my code to close a dialog when I click on it. This does not work for me. However, if I use the local development version, it works fine. The problem is that I cannot run the jquery version for this part of the site.
Thoughts on how to achieve a click outside the modeless dialogue to close?
// Close Pop-in If the user clicks anywhere else on the page jQuery('body') .bind( 'click', function(e){ if( jQuery('.detailsPopup').dialog('isOpen') && !jQuery(e.target).is('.ui-dialog, a') && !jQuery(e.target).closest('.ui-dialog').length ){ jQuery('.detailsPopup').dialog('close'); } } );
Jason
source share