title: Jquery UI Modal Dialog not working
body: <p>I have a lot of trouble to find a way to make jquery ui modal dialog work..the modal dialog just returns false...</p>
  
  <p>a fiddle ou can see here <a href="http://jsfiddle.net/fVrFj/6/" rel="nofollow">http://jsfiddle.net/fVrFj/6/</a></p>
  
  <pre><code>    function modal_delete_pics(){
              $(function(){
                $( "#dialog:ui-dialog" ).dialog( "destroy" );
  
                $( "#dialog-confirm" ).dialog({
                  resizable: false,
                  height:140,
                  modal: true,
                  buttons: {
                      "delete": function() {
                         $( this ).dialog( "close" );
  
                                       return true;
                  },
                      "cancel": function() {
                          $( this ).dialog( "close" );
                          return false;
  
                  }
              }
  
          });
      });
  };
      $('#clickme').click(function(){
          if(modal_delete_pics()==true){
             $('body').append('&lt;div&gt;deleted&lt;/div&gt;');  
             }
            else{                   
               $('body').append('&lt;div&gt;canceled&lt;/div&gt;');
                }
  });
  </code></pre>
  
  <p>Thanks a lot!</p>