You could use the hover() method, instead of the separate mouseover() and mouseout() methods. And you could also use the .toggleClass method instead of the addClass() and removeClass() methods.
Larry On Dec 21, 4:55 pm, rolfsf <[EMAIL PROTECTED]> wrote: > I've set up a simple action when a user clicks on a row in a table. > (highlight the row, load some details via ajax into a div) > > However, in one column of the table I've got a link/button that, when > clicked, will hide that row. If clicked, I don't want to highlight the row > or load it's details. How do I distinguish between the two? > > // highlight rows, load details > $("#myTable tr").mouseover(function() { > $(this).addClass("over");}).mouseout(function() { > $(this).removeClass("over"); > }).click(function(){ > $(this).addClass("thisRow").siblings().removeClass("thisRow"); > var job = $(this).attr('id') > var details = (job + '.htm') > $("#console").load(details); > }); > > // hide a row after acknowledgement > $("#myTable a.ackn").click( function(){ > $(this).parents('tr').hide(); > }); > > thanks, > r. > -- > View this message in > context:http://www.nabble.com/clicking-on-row-vs.-clicking-on-link-in-that-ro... > Sent from the jQuery General Discussion mailing list archive at Nabble.com.