title: In Twitter Bootstrap, how do I unbind an event from the closing of a modal dialog?
body: <p>I have a function that is bound to the action of hiding a modal dialog.</p>
  
  <p>I'm using code similar to the accepted answer to <a href="https://stackoverflow.com/questions/8363802/bind-a-function-to-twitter-bootstrap-modal-close?rq=1">this</a> question. </p>
  
  <pre><code>$('#myModal').on('hidden', function () {
      // do something…
  })
  </code></pre>
  
  <p>However, this dialog may get reopened for editing, and, when that happens, I don't necessarily want to run this code. Is there a way to "unbind" the function so that it is no longer run when the dialog closes? I haven't found anything in <a href="http://twitter.github.com/bootstrap/javascript.html#modals" rel="noreferrer">the documentation</a>.</p>