:disable_with for submit button, Rails 3, JQuery
I'm trying to g开发者_如何学Pythonet :disable_with to work on my button. I'm using JQuery though, and the form is not a javascript implements form, so I'm wondering if theres a better way to make this work?
Unfortunately, :disable_with
will not work without Javascript. This is needed to modify the DOM.
disable_with option is deplrecated since rails 3.2.5, So disable with should be used as
%button.btn.large.primary{:type => "submit", :data => {'disable-with' => 'Please wait...'}} Save
Please refer to api documentation
精彩评论