I have a table row with ONCLICK event (that toggles additional data below). Inside one of the row cells I have a button (when clicked is performing an AJAX action). When I click
If you use jQuery, you can just do this instead:
tbody.on('click', 'tr', function (e) { let target = $(e.target); if (target.is('i') || target.is('button') || target.is('a') || target.hasClass('select-checkbox')) { return; } //your stuff here });