javascript - How to keep round corners using Bootstrap -


from following image image round corners, 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:

image after display none

if delete button node, bootstrap sets rounded corners, not useful.

this need, using javascript:

this need

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'); 

http://jsfiddle.net/uvffe/

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'); 

http://jsfiddle.net/uvffe/1/

a toggle example:

http://jsfiddle.net/uvffe/3/


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -