jquery - table row click event and checkboxes -


this question has answer here:

i have click event attached table row , within columns have checkboxes.

<table>     <tbody>         <tr class='shop_order_single_table'>             <td><input type='checkbox' /></td>             <td><input type='checkbox' /></td>             <td><input type='checkbox' /></td>         </tr>     </tbody> </table> 

when click checkbox click event row still executes.

here code:

     $(".shop_order_single_table").on("click",function() {    //click event executes                 }); 

how have click event table row not execute when clicking checkbox?

$(".shop_order_single_table input").on("click", function(e) {     e.stoppropagation(); });     $(".shop_order_single_table").on("click", function(e) {     // code }); 

Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -