【问题标题】:using knockout sortable with bootstrap popover使用带有引导弹出框的淘汰赛排序
【发布时间】:2015-04-18 21:06:20
【问题描述】:

要使用引导弹出框,我使用的是 knockout-bootstrap,但我可以使用其他东西,如 Adam Marshall here 的回答中的内容。

通常,在按钮单击事件中,我会如下使用它..

<button class="btn" data-bind="popover: {template: 'popoverBindingTemplate', title: 'Popover', trigger: 'click'}">

我希望在淘汰赛可排序示例中触发学生表格中的弹出框。 jsfiddle:

我不能在单击事件上使用它,因为它会引发错误:多个绑定(文本和弹出框)正在尝试控制同一元素的后代绑定。您不能在同一个元素上同时使用这些绑定。

有什么方法可以在“aftermove”(drop)事件中打开弹出框。

我尝试调用如下方法,但即使在 console.log() 上也没有显示任何内容。

 <div class="student" data-bind="visible: gender() == 'male', text: '[M]'+name(),afterMove: openpopover"></div>`

真诚感谢任何帮助..

谢谢

【问题讨论】:

    标签: knockout.js knockout-sortable


    【解决方案1】:
    <div>  
     <span class="student" data-bind="text: name()"></span> 
     <button class="btn btn-xs btn-success"  data-bind="popover: {template: 'popoverBindingTemplate', title: 'Popover', trigger: 'click'}">-</button>
    </div>
    

    【讨论】:

      猜你喜欢
      • 2017-04-15
      • 2016-11-15
      • 2018-09-05
      • 2013-02-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-08-05
      • 1970-01-01
      相关资源
      最近更新 更多