I use the ButtonStrap Group Button class and found that in my own code, if the button is pressed, the button will close after a few seconds ....
How can I make sure it stays pressed?
<div class="row"> <div class="col-md-12"> <div class="form-group"> <label>Stage of business:</label> <br /> <div class="btn-group"> <button class="btn btn-default"><span class="glyphicon">Start-up</span> </button> <button class="btn btn-default"><span class="glyphicon">Growth Company</span> </button> <button class="btn btn-default"><span class="glyphicon">Mature Company</span> </button> </div> </div> </div>
Thanks.
Update
I added active css and I found that when I clicked the button, the whole page refreshes, so the button loses the active css class. How to disable the send action only for these buttons 3? Coz I have a button that is also in this form, and it needs to call the submit action.
$('.btn-stage').click(function () { $(this).toggleClass("active");
Update 3
In addition, in this group of buttons you can select only one button, if another button is selected, the remaining buttons should go back.
Thanks.
source share