Hi everyone! A brief question from a newbie. I have a table row which I want to be clickable, but I have a specific link within one cell. Something like:
<a id="row33" href="#"> <tr> <td> <a id="innerXX" href="#">inner link!</a> </td> </tr> </a> I want to have the clicks on the inner link call a certain function (eg, innerClick), while clicks on any other area of the row should call a different function (eg, outerClick). I have tried binding a function to the click on the entire row, and then discriminating where the click happened inside the callback: $("#row33").click( function(e) { if (e.target.attr("id") == "innerX) ; // do inner link things else ; // do outer click things }); The trouble is that the ".target" of the event passed to my callback does not have a attr() function; I get an error message "e.attr is not a function". What am I doing wrong? I also tried assigning different classes to the row and to the inner link and discriminate based on .hasClass() with the same result. If someone could offer me some very basic guidance on how to get information from event.target, that would be great. Thank you so much for yoru help, James