title: Adding custom function to Bootstrap.js
body: <p>I've recently run across a situation in which I'd like to change Bootstrap's default behavior at a fundamental level.  I'd like to add a custom method to the <code>Modal</code> class so that a custom method may be called like any other stock <code>Modal</code> method:     </p>
  
  <pre><code>$('#my-modal').modal('myMethod', myParameter);
  </code></pre>
  
  <p>I have this working by adding a function to the <code>Modal</code>'s constructor:</p>
  
  <pre><code>$.fn.modal.Constructor.prototype.myMethod = function (myParameter) {
    ...
  }
  </code></pre>
  
  <p>However, the <code>myParameter</code> variable is not being passed.  How do I access/pass <code>myParameter</code> to a custom Bootstrap method?</p>