you can use event.stopImmediatePropagation() in the last col button event handler.
$('#movies tr').click(function () { var href = $(this).find("a").attr("href"); if(href) window.location = href; }); $('#movies input:button').click(function (e) {
the advantage (or inconvenient) is that you can click on the button in the last cell. (in the retreat of the field). I can be inconvenient, since the skip click button will open the linked page and surprise the user.
Another alternative would be to use only one event handler, which solves the action with event.which. This is my favorite method as it limits the number of event handlers. use delegate for the same reason. One table handler instead of one row.
$('#movies').delegate('tr', 'click', function (e) { if ( $(e.target).is('input:button') ) { // button stuff } else { var href = $(this).find("a").attr("href"); if(href) window.location = href; } });
source share