What if you specifically set up an event listener? The most specific rule must be applied. Therefore, if you click on a row, the row event will fire, if you click on a button, then the button event will fire FIRST, and then the parent will fire. This way you can use a simple variable to check if the button has been checked.
Var gContext;
$("#btn-1"). on('click', function() { gContext = true }); $("table-1 tr").on( 'click', function(e){ if(button was clicke$("table-1 tr").on( 'click', function(e){ if(gContext === true){
- did it on my phone, I hope that it is correctly drawn up.
Ethan source share