title: Off doesn't work properly
body: <p>I'm trying to show confirm dialog before form submit:</p>
  
  <pre><code>  $('body').on('submit', 'form[data-confirm-dialog-text]', (e) -&gt;
      form = $(this)
      e.preventDefault()
        $.show_dialog(form.data('confirm-dialog-title'), form.data('confirm-dialog-text'), form.data('ok-text'), form.data('cancel-text'), (-&gt;
          form.off('submit').submit()
        ))
    )
  </code></pre>
  
  <p>On success I do the following: <code>form.off('submit').submit()</code>, but keep getting confirm dialog, which means that form is not inbound.</p>
  
  <p>If I change <code>$('body').on('submit', 'form[data-confirm-dialog-text]'</code> to <code>$('form[data-confirm-dialog-text]').on('submit',</code>everything works fine. What is the difference and what am I doing wrong?</p>