title: Braintree drop-in, disable submit button while processing
body: <p>I'm trying to do something that seems easy but I cannot get it to work.
  I'm using Braintree dropin UI and I have submit button.
  I need to disable the button while processing and I cannot find a good event to attach to.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var ct = 'tokenhere';
  var bt = braintree.setup(ct, 'dropin', {
    container: 'braintreedropin',
  });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;form id="PayByBrainTreeCheckout" method="post"&gt;
    &lt;div id="braintreedropin"&gt;&lt;/div&gt;       
    &lt;input type="submit" value="Pay"&gt;                          
  &lt;/form&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>I tried <code>$('#PayByBrainTreeCheckout').submit(function(){/*disable button*/})</code> but this is also disabling the button if there is a validation error in the form.</p>
  
  <p>Any ideas? Thanks</p>