I am trying to add an event to my spine. I have a setup. I want to associate an event with a div in a view element, but I want to select this div with two classes.
Example:
<div id="mainContent"> <div class="small docs"></div> </div> Views.Main = Backbone.View.extend({ el: $("#mainContent"), events: { "click .small .docs": "renderActiveDocs" }, initialize: function () {...} });
Having installed this method, this click does not seem to work. If I delete one of the classes and just leave one, then it will work.
However, the class of this div will change from "small" to "large", and I do not want the click event to fire in this case.
Am I missing something in the syntax or is it impossible?
source share