我有一个带有按钮组的控制组作为复选框,如下所示:
<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>
我包括这些:
<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>
和 js.js :
$(function(){
$('#cyb3r').button();
});
我也试过这些:
$(function(){
$('.navs').button();
});
$(function(){
$('.control-group').button();
});
但它们都不适用于该复选框组。但为什么?