开发者

:disable_with for submit button, Rails 3, JQuery

开发者 https://www.devze.com 2023-02-05 22:16 出处:网络
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 t

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

0

精彩评论

暂无评论...
验证码 换一张
取 消