title: How can I use callback on Bootstrap Modal confirm?
body: <p>I'm implementing <a href="http://getbootstrap.com/javascript/#modals" rel="nofollow">Bootstrap Modal</a> and I need to return <code>true</code> if user clicks confirm.<br>
  At the moment I'm not able to use data attributes like this:</p>
  
  <pre><code>&lt;button type="button" data-toggle="modal" data-target="#myModal"&gt;Launch modal&lt;/button&gt;
  </code></pre>
  
  <p>I'm not to familiar with callbacks and I want to return <code>TRUE</code> when user clicks confirm. Is there a way I can achieve this? <a href="http://jsfiddle.net/9KyL5/3/" rel="nofollow">Here is my fiddle</a>.</p>
  
  <p><strong>Put in context;</strong>  I want to delete a record. If return <code>true</code>, then continue deletion.</p>
  
  <pre><code>$('#butt').click(function() {
      $('#content').portalDialogue({
          title : 'Hjelp',
          confirm: true,
          btnClose : 'Lukk',
          btnConfirm : 'OK',
          action: '#'
      });
  });
  
  (function ( $ ) {
      $.fn.portalDialogue = function(option,callback) {
          var self   = this;
          var title   = option.title || 'Melding';
          var confirm   = option.confirm || false;
          var btnClose   = option.btnClose || 'Lukk';
          var btnConfirm   = option.btnConfirm || 'Ok';
  
          // Title
          $('.modal-title').text(title);
          // Close button
          $('.btnClose').html(btnClose);
          // Confirm button
          $('.btnConfirm').html(btnConfirm);
          // Dialog text
          $('.modal-body').html($(self).html());
  
          //IS confirm?
          if (confirm) {
              $('.btn.default').addClass('btn-default');
              $('.btn.confirm').removeClass('hidden').addClass('btn-primary').click(function(callback){
                  return callback(true);                
              });
          } else {
              $('.btn.default').addClass('btn-primary');
              $('.btn.confirm').addClass('hidden');
          }
  
          // Open dialogue
          $('.default-modal').modal('show');
      };
  }( jQuery ));
  </code></pre>