javascript - Making a Twitter Bootstrap button (link) disabled -
what's real , working way create twitter bootstrap button (which link) disabled? suggest is:
$("#my_btn").prop("disabled", true); //1 //or $("#my_btn").attr("disabled", true); //2 but not work. work?
a link doesn't have disabled attribute.
instead, you'll need add together .disabled css class.
$("#my_btn").addclass("disabled"); http://getbootstrap.com/css/#buttons-disabled (the section on anchor element)
as per give-and-take below, should note isn't sure-fire way of disabling link in browsers. uses css's pointer-events: none, isn't robust disabled attribute on <button> element.
javascript jquery html twitter-bootstrap twitter-bootstrap-3
No comments:
Post a Comment