• <i id='FTWlj'><tr id='FTWlj'><dt id='FTWlj'><q id='FTWlj'><span id='FTWlj'><b id='FTWlj'><form id='FTWlj'><ins id='FTWlj'></ins><ul id='FTWlj'></ul><sub id='FTWlj'></sub></form><legend id='FTWlj'></legend><bdo id='FTWlj'><pre id='FTWlj'><center id='FTWlj'></center></pre></bdo></b><th id='FTWlj'></th></span></q></dt></tr></i><div id='FTWlj'><tfoot id='FTWlj'></tfoot><dl id='FTWlj'><fieldset id='FTWlj'></fieldset></dl></div>
    <tfoot id='FTWlj'></tfoot>
  • <small id='FTWlj'></small><noframes id='FTWlj'>

    <legend id='FTWlj'><style id='FTWlj'><dir id='FTWlj'><q id='FTWlj'></q></dir></style></legend>

        • <bdo id='FTWlj'></bdo><ul id='FTWlj'></ul>
      1. Bootstrap 单选按钮组敲除绑定不起作用

        Bootstrap radio button group knockout binding doesn#39;t work(Bootstrap 单选按钮组敲除绑定不起作用)
      2. <small id='q0Cw6'></small><noframes id='q0Cw6'>

          <tbody id='q0Cw6'></tbody>
          <tfoot id='q0Cw6'></tfoot>

        1. <i id='q0Cw6'><tr id='q0Cw6'><dt id='q0Cw6'><q id='q0Cw6'><span id='q0Cw6'><b id='q0Cw6'><form id='q0Cw6'><ins id='q0Cw6'></ins><ul id='q0Cw6'></ul><sub id='q0Cw6'></sub></form><legend id='q0Cw6'></legend><bdo id='q0Cw6'><pre id='q0Cw6'><center id='q0Cw6'></center></pre></bdo></b><th id='q0Cw6'></th></span></q></dt></tr></i><div id='q0Cw6'><tfoot id='q0Cw6'></tfoot><dl id='q0Cw6'><fieldset id='q0Cw6'></fieldset></dl></div>
          • <legend id='q0Cw6'><style id='q0Cw6'><dir id='q0Cw6'><q id='q0Cw6'></q></dir></style></legend>

                  <bdo id='q0Cw6'></bdo><ul id='q0Cw6'></ul>
                  本文介绍了Bootstrap 单选按钮组敲除绑定不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  I followed this: http://volaresystems.com/blog/post/2013/12/09/Using-Bootstrap-3-radio-button-groups-with-Knockout-3-data-bindings (jQuery 2.0.3, Bootstrap 3.0.3, Knockout 3.0.0)

                  As far as I can see the only differences are the jQuery, Knockout and Bootstrap version numbers, but the major version numbers match. http://jsfiddle.net/csabatoth/rLtL16xk/12/ (jQuery 2.1.3, Bootstrap 3.3.4, Knockout 3.3.0)

                  <p>
                      Currently selected: <span data-bind="text: selectedOption"></span>
                  </p>
                  
                  <div class="btn-group-vertical" data-toggle="buttons">
                      <label class="btn btn-lg btn-primary" data-bind="css: { 'active': selectedOption() === 'Purchase Target Cat' }">
                          <input type="radio" name="options" id="option1" data-bind="checked: selectedOption, checkedValue: 'Purchase Target Cat'">Purchase Target Cat
                      </label>
                      <label class="btn btn-lg btn-primary" data-bind="css: { 'active': selectedOption() === 'Purchase Existing Cat' }">
                          <input type="radio" name="options" id="option2" data-bind="checked: selectedOption, checkedValue: 'Purchase Existing Cat'">Purchase Existing Cat
                       </label>
                       <label class="btn btn-lg btn-primary" data-bind="css: { 'active': selectedOption() === 'Existing Dog Purchases Target Cat' }">
                          <input type="radio" name="options" id="option3" data-bind="checked: selectedOption, checkedValue: 'Existing Company Purchases Target Company'">Existing Dog Purchases Target Cat
                       </label>
                  </div>
                  
                  var viewModel = function () {
                      var self = this;
                      self.selectedOption = ko.observable("Target Cat");
                  }
                  
                  $(document).ready(function () {
                      var vm = new viewModel();
                      ko.applyBindings(vm);
                  });
                  

                  Can anyone point out why this doesn't work? The binding is only one way. It gets the initial value, but not useful further.

                  解决方案

                  try <div class="btn-group-vertical" data-toggle="buttons"> remove data-toggle="buttons"

                  add css:

                  label.btn > input[type='radio']
                  {
                      display: none;
                  }
                  

                  js: remove $(document).ready(function () {

                  DEMO

                  这篇关于Bootstrap 单选按钮组敲除绑定不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Bootstrap radio button quot;checkedquot; flag(Bootstrap 单选按钮“已选中旗帜)
                  Toggle HTML radio button by clicking its label(通过单击标签来切换 HTML 单选按钮)
                  Javascript how to change radio button label text?(Javascript如何更改单选按钮标签文本?)
                  JavaScript radio button confirmation(JavaScript 单选按钮确认)
                  How can I automatically select specific radio buttons with Greasemonkey?(如何使用 Greasemonkey 自动选择特定的单选按钮?)
                  AngularJs. Is it possible to deselect HTML “radio” input by click?(AngularJs.是否可以通过单击取消选择 HTML“收音机输入?)

                  <small id='MLgUu'></small><noframes id='MLgUu'>

                • <legend id='MLgUu'><style id='MLgUu'><dir id='MLgUu'><q id='MLgUu'></q></dir></style></legend>
                    <i id='MLgUu'><tr id='MLgUu'><dt id='MLgUu'><q id='MLgUu'><span id='MLgUu'><b id='MLgUu'><form id='MLgUu'><ins id='MLgUu'></ins><ul id='MLgUu'></ul><sub id='MLgUu'></sub></form><legend id='MLgUu'></legend><bdo id='MLgUu'><pre id='MLgUu'><center id='MLgUu'></center></pre></bdo></b><th id='MLgUu'></th></span></q></dt></tr></i><div id='MLgUu'><tfoot id='MLgUu'></tfoot><dl id='MLgUu'><fieldset id='MLgUu'></fieldset></dl></div>
                      <tfoot id='MLgUu'></tfoot>
                            <tbody id='MLgUu'></tbody>
                            <bdo id='MLgUu'></bdo><ul id='MLgUu'></ul>