在bootstrap 3.0 中使用 radio button
http://v3.bootcss.com/javascript/#buttons
<div class="btn-group" data-toggle="buttons">
<label class="btn btn-primary">
<input type="radio" name="options" id="option1"> Option 1
</label>
<label class="btn btn-primary">
<input type="radio" name="options" id="option2"> Option 2
</label>
<label class="btn btn-primary">
<input type="radio" name="options" id="option3"> Option 3
</label>
</div>
出现 这个错误
cannot call methods on button prior to initialization; attempted to call method 'toggle'
表现情况是 按钮无法选择。
解决办法和产生原因。
这个问题是由于bootstrap 和 jquery.ui 冲突引起的。
解决办法 调整载入的js顺序,使jquyer.ui 插件先载入。然后再载入 bootstrap
http://stackoverflow.com/questions/13235578/bootstrap-radio-buttons-toggle-issue