Search code examples
jquerymodel-view-controllerbackbone.jsmarionette

How to use jquery :not in Marionette ItemView events


How can we use jquery :not selector in Marionette ItemView events?
eg. following is wrong, doesn't work -
events: {
"click #div1 :not #div2: "check"
// Other events
}

Reference for jquery :not- http://api.jquery.com/not-selector/


Solution

  • events: { 
      "click #div1:not(#div2)": "check"
    }