title: jQueryUI Enabling the link with respect of closing dialog window
body: <p>I am working on jQuery UI dialog, <a href="http://jsfiddle.net/mobj45kt/" rel="nofollow">JS Fiddle</a> for reference. If you observe on click of close window(dialog), the links are not getting enabled, however the links should be enabled based on relative window close. How can I relate the closing dialog window with the respective link and enable it again?</p>
  
  <pre><code>$(function() {
  
      function opener(params){
          var _params = params;
              for (var obj in _params){
                  dialogOpener(_params[obj]);
              }
          function dialogOpener(selector){
              $('#'+selector.linkSelector).on('click', function(ev){
                  ev.preventDefault();
                  ev.stopPropagation();
                  var url = $(this).attr('href');
                  if ($(ev.target).hasClass('disabled')) {
                          return false;
                  } else{
                      $('#'+selector.moduleSelector).dialog({width: 800, position: 'top'}).load( url);
                      $(this).addClass('disabled');
                  }
              });
          }
      }
      opener([
        { linkSelector: 'google', moduleSelector: 'googleModule'},
        { linkSelector: 'facebook', moduleSelector: 'facebookModule'},
        { linkSelector: 'yahoo', moduleSelector: 'yahooModule'},
        { linkSelector: 'gmail', moduleSelector: 'gmailModule'}
      ]);
  });
  </code></pre>