I am using Ruby on Rails 3 and I would like to disable and toogle the CSS class of a form.submit
when the form is AJAX submitted and until the AJAX HTTP request is completed (I am using the default jQuery framework for JavaScript).
My form is the following:
<%= form_for(@article, :remote => true) do |form| %>
...
<%= form.submit(nil, {:id => 'button_id', :class => 'button_class'}) %>
<% end %>
How can I make that in a "common"/"good"/"proper" way?
form.submit
but only for thesubmit_tag
? – Phaeton