Answer the question
In order to leave comments, you need to log in
How to make button disabled in bootstap-3?
It is possible to replace radio buttons with buttons in bootstape getbootstrap.com/javascript/#buttons
Works as it should, but I can't figure out if it's possible to make a button inactive if the switch has a disabled attribute
This construction helped
$('.btn.disabled').on('click',function(e){e.stopPropagation();})
Answer the question
In order to leave comments, you need to log in
CSS has a wonderful property
.disabled {
pointer-events: none;
}
Why not, add disabled="disabled" and the button is not active.
Here is an inactive button from your example
Soori. I haven't read about switches. For the switch, the code allows you to make it inactive, but JS works.
<label class="btn btn-primary" disabled="disabled">
<input type="radio" name="type_edit" id="option2" autocomplete="off">Изменить
</label>
<label class="btn btn-primary disabled">
<input disabled="disabled" type="radio" name="type_edit" id="option2" autocomplete="off">Изменить
</label>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question