Skip to content

I was searching for a way to close my modal dialog box when clicked outside of the dialog and i found a very good article by Ryan Jeffords at:

Thanx Ryan

<script type="text/javascript">
   //Wait for the document to load
   $(document).ready(function() {
      //Create the dialog and open it
      //Bind to the ui-widget-overlay and watch for when it is clicked
      $('.ui-widget-overlay').live("click", function() {
         //Close the dialog