How to capture click on cross icon of jquery dialog
<p>i am using jquery dialog and i need to capture click on cross icon of jquery dialog bcoz i want to do something.</p>

<pre><code>$("#dialog").dialog({
              autoOpen: false,
              height: 430,
              width: 450,
              modal: false,
              draggable: false,
              resizable: false,
              zindex: 3999,
              close: function (ev, ui) {
                  //this function will be call back when dialog will be closed
              },
              show: {
                  effect: "fade",
                  duration: 1000
              },
              hide: {
                  effect: "fade",
                  duration: 500
              }

          });
</code></pre>
