jquery - How to changing css on bootstrap button Group -


the below code toggles button in group. i'm having fun tying change css of these buttons, in particular selected button.

<span class="label label-primary">age</span>     <div class="btn-group" id="ageid">     <button type="button" style="width:120px" class="btnmyage btn-default" id="3">under 10</button>     <button type="button" style="width:120px" class="btnmyage btn-default" id="1">under 50</button>     <button type="button" style="width:120px" class="btnmyage btn-default" id="2">over 50</button> </div> <script>     $(".btn-group > .btnmyage").click(function () {                                          $(this).addclass("active").siblings().removeclass("active");     }) </script> 

my custom css file:

.btnmyage, .btn:active {     background-color: #ffe13a; } 

change css to

.active {     background-color: #ffe13a; } 

or else background-color applied buttons because of btnmyage class.


Comments

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -