TD alert

Hi can you help me on this please, I am trying to alert when i click the table row.

but it will only alert in the first row, even i clicked in the last row.


  $(function(){
      $(this).click(function(e){

       if($(e.target).is('tr.mytableClass,tr#mytableID span')){
             var esp = $('tr.mytableClass,tr#mytableID ').find('td').eq(1).text();
             alert(esp);
       }



    });
});




  <table  class="mytable">
           <tr>
                 <td><span> 0001<span></td>
                  <td><span> Daniela<span></td>
                   <td><span> Shake<span></td>
            </tr>

             <tr>
                 <td><span> 0002<span></td>
                  <td><span> Jenny<span></td>
                   <td><span>Max<span></td>
            </tr>

             <tr>
                 <td><span> 0002<span></td>
                  <td><span> Mecy<span></td>
                   <td><span>Vilz<span></td>
            </tr>


 </table>


OOps looks like i fixed my problem… :slight_smile: great!.

thanks to .children()