Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

The following HTML should disable and rename the button accordingly while submitting :

  <button data-disable-with="Please wait..." name="button" type="submit">Checkout</button>

But in myChrome browser it doesn't do anything. Anything I can do ?

My Chrome version is 30

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
394 views
Welcome To Ask or Share your Answers For Others

1 Answer

data-disable-with can only be used in rails form element. But if you want to apply it on HTML form elements you can do something like as follows-

You can try data-loading-text="Loading..."along with a js code snippet.

$("#btn1").on("click", function(){
    $(this).button("loading");
})

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...