【问题标题】:How to use jquery :not in Marionette ItemView events如何使用 jquery:不在 Marionette ItemView 事件中
【发布时间】:2016-02-16 22:51:31
【问题描述】:

我们如何在 Marionette ItemView events 中使用 jquery :not 选择器?
例如。以下是错误的,不起作用 -
events: {
"click #div1 :not #div2: "check"
// Other events
}

参考jquery :not-http://api.jquery.com/not-selector/

【问题讨论】:

  • :not() 选择器的引用是 api.jquery.com/not-selector 你所拥有的是对 .not() 方法的引用
  • 好的,进行了相关更改!

标签: jquery model-view-controller backbone.js marionette


【解决方案1】:
events: { 
  "click #div1:not(#div2)": "check"
}

【讨论】:

  • @VijaySingh 太棒了!没问题:)
猜你喜欢
  • 1970-01-01
  • 2014-11-12
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2015-11-12
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多