I am trying to listen to a DOM element event with famous in a similar way as the jQuery .on
listner.
basically I am trying to do this with famo.us
var surface = new Surface({content: '<div>' +
'<button class="close">Close</button>'
'<button class"edit">Edit</button>' +
'</div>'});
surface.on("click", ".edit", function () {
console.log("edit button has been clicked");
});
Obviously it doesn't work like that in famo.us because you cannot sue a selector as the second argument but I wanted to know how I would go about this sort of situation in famo.us.