I have the following listeners:
$('td').on('click', '.time_note', function (e) { // When the user clicks the note div
alert('note click');
});
$('table').on('click', 'td', function(e) {
alert('time click');
});
I need two different actions depending on whether the note is clicked or the entire cell is clicked. I tried doing this, however, if the note is clicked - so is the cell. Both actions are fired, subsequently. Makes perfect sense.
However, I don't want that to happen. If the note is clicked, the action for the entire cell should not fire and vice-versa. What way is there to accomplish this? I tried to use .off
, but that didn't work.