2

I have a control-group with a button group as checkboxes like this :

<div class="control-group" id="cyb3r" >
            <label class="control-label" for="c">C</label>
            <div class="btn-group navs controls" data-toggle="buttons-checkbox">
                <button class="btn" type="button">1</button>
                <button class="btn" type="button">2</button>
                <button class="btn" type="button">3</button>
            </div>

</div>

and I include these :

<link rel="stylesheet"
    href="<?php echo base_url('assets/style/style.css');?>">
<link rel="stylesheet"
    href="<?php echo base_url('assets/style/bootstrap.min.css');?>">
<script
    type="text/javascript"
    src="<?php echo base_url('assets/script/jquery.js')?>"></script>
<script
    type="text/javascript"
    src="<?php echo base_url('assets/script/bootstrap.min.js')?>"></script>
<script
    type="text/javascript"
    src="<?php echo base_url('assets/script/bootstrap-button.js')?>">
    </script>
<script
    type="text/javascript"
    src="<?php echo base_url('assets/script/js.js')?>"></script>

and js.js :

$(function(){
    $('#cyb3r').button();  
});

I tried these also :

$(function(){
    $('.navs').button();  
});

$(function(){
    $('.control-group').button();  
});

but none of them work for that checkbox group. but why?

2 Answers 2

5

bootstrap.min.js already includes bootstrap-button.js

you can remove

<script
type="text/javascript"
src="<?php echo base_url('assets/script/bootstrap-button.js')?>">
</script>
Sign up to request clarification or add additional context in comments.

Comments

2

Are you sure that all libraries are included correctly? Because for me it works fine: http://jsfiddle.net/QchpT/

3 Comments

yes , I added a click event on navs class with an alert . that worked , and I checked also in headers , all are 200 OK
Have you been seen my example? I understood you correctly about what does not work? Button selection? Or what?
Yes I saw that , button selection doesn't work . according to jsfiddle.net/QchpT/1 , your example works without javascript too. when u click on buttons they don't get actived - in my code -

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.