title: JS can't enable the button after disabled
body: <p><strong>JS</strong></p>
  
  <p>I have a form which has save and download button.I want the download button to be disabled initially.when the form is saved it should be enabled.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$("#download_form").attr('disabled', 'disabled');
     $('.save-form').on('click', function(){
     $("#download_form").removeAttr('disabled');
   });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code> .fieldset
            .row
              .col-sm-3
                = f.submit "Save", class: "btn btn-primary save-form"
              .col-sm-3
                = f.submit "cancel", type: :reset, class: "btn btn-primary"
              .col-sm-3
                %div{id: 'download_form'}
                - if @customer_detail.save
                  = link_to "Download", download_csv_customer_detail_path(@customer_detail.id, format: "csv"), disabled: true, class: "btn btn-primary"
              .col-sm-3
                = link_to("Print", "javascript:print()", class: "btn btn-primary")</code></pre>
  </div>
  </div>
  
  The problem is i can't able to enable back the download button after the form is saved.can someone plz help me.thanks in advance!!</p>