How can I have a disabled button in a btn-group after a call to reset?
I have a btn-group. I set one button as disabled. All works fine.
But, if I call button('reset') then it removed the disabled on the button and it can NEVER be added again.
Here is a fiddle http://jsfiddle.net/ejW3w/66/
$(".btn-group button").button("reset"); // removed the disable !!
$(".btn-group button").addClass('disabled').attr('disabled','disabled'); // This addclass does not re-add the disabled !!
I try add disabled with .addClass('disabled').attr('disabled','disabled') : but nothing works.
Thx..
Try this:
$(".btn-group button").addClass('disabled').prop('disabled',true);
Fiddle http://jsfiddle.net/ejW3w/70/
Docs http://api.jquery.com/prop/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With