I would probably do something like: $("tr.Order").each(function(){ this.isover = false; $(this).bind("click", function() { if( !this.isover ){ showOrderDetails($(this).attr("id")); } }); $('input:checkbox', this) .hover( function(){$(this).parents('tr').get(0).isover = true;}, function(){$(this).parents('tr').get(0).isover = false;} ); });
On Tue, Jan 27, 2009 at 10:36 AM, chrille112 <chri...@halvapriset.com>wrote: > > > I have a table, and I want a click on each row to trigger a function. This > is > my code: > > $("tr.Order").each(function() > { > $(this).bind("click", function() { > showOrderDetails($(this).attr("id")); > }); > }); > > This works perfect! My problem is that I also have a checkbox on each row, > and that also gets affected. So when I click the checkbox it triggers > function showOrderDetails(). > > How to I remove the action from check box? > -- > View this message in context: > http://www.nabble.com/Exclude-checkbox-tp21686977s27240p21686977.html > Sent from the jQuery General Discussion mailing list archive at Nabble.com. > > -- Benjamin Sterling / Web Developer kenzomedia.com / kenzohosting.com / benjaminsterling.com / refreshbmore.org 443.844.7654 // Twitter @bmsterling Skype: benjamin.sterling // AIM: thekenzoco