javascript - How to keep round corners using Bootstrap -
from following image , want hide second button,
using javascript
, , need first button have round corners.
after hide second button using javascript, first button has rectangular shape on right side:
if delete button node, bootstrap sets rounded corners, not useful.
this need, using javascript:
the standard bootstrap
html button structure:
<div class="btn-group"> <button class="btn btn-mini action_select customselect" id="btn_bulk_action" data-toggle="button" disabled="disabled">reply<span class="reply2"></span></button> <button class="btn btn-mini action_select" data-toggle="button" id="btn_bulk_action_archive" disabled="disabled" style=" display: none; ">archive<i class="icon-remove"></i></button> </div>
it's because buttons in button group, , default bootstrap expects more 1 button.
you should either remove button group or modify css round button if there one.
anyway answer question, simplest way via jquery:
$('.btn-group').removeclass('btn-group');
although might want add class in again would:
$('.btn-group').addclass('btn-group-single');
css:
.btn-group-single > .btn:first-child { border-top-right-radius: 4px; border-bottom-right-radius: 4px; }
then can remove in future:
$('.btn-group').removeclass('btn-group-single');
a toggle example:
Comments
Post a Comment