title: SimpleModal Confirm Override: Would like callback to return true or false instead of URL redirect
body: <p>Hi I am a jquery newbie and trying to use the simplemodal plugin.  Before this attempt my code was </p>
  
  <pre><code>isYes = confirm("Are you sure . . . "?); 
  return isYes;
  </code></pre>
  
  <p>The simplemodal demo does a URL redirect.  I would like to return true or false the way a default confirm button does.</p>
  
  <p>Is this possible?</p>
  
  <p>When I try this (Please see code below), the modal dialog pops up, but instead of waiting, it proceeds with the underlying button action before I can click anything!</p>
  
  <p>This is how I call confirm:</p>
  
  <pre><code>confirm(confirm_message, function(isYes) { return isYes; });
  
  
  
  
  function confirm(message, callback) {
      var isYes = false; 
      $('#confirm').modal({
          closeHTML: "&lt;a href='#' title='Close' class='modal-close'&gt;x&lt;/a&gt;",
          position: ["20%", ],
          overlayId: 'confirm-overlay',
          containerId: 'confirm-container',
          onShow: function(dialog) {
              var modal = this;
  
              $('.message', dialog.data[0]).append(message);
  
              // if the user clicks "yes"
              $('.yes', dialog.data[0]).click(function() {
                  isYes = true;
                  // call the callback
                  if ($.isFunction(callback)) {
                      callback.apply(this, jQuery.makeArray(isYes));
                  }
                  // close the dialog
                  modal.close(); // or $.modal.close();
  
              });
  
  
          }
      });
      return isYes;
  }
  </code></pre>