Nested table, get value of td with class i defined, but only on selected row

Nested table, get value of td with class i defined, but only on selected row

I desperately need help on this getting the value of a column thats nested inside a table. I cant get the logic or code right. 

My table:

  1. <table id="eventsToList" class="table table-striped table-condensed table-responsive">
  2.                 <thead>
  3.                     <tr class="header">
  4.                         <th></th>
  5.                         <th>EventID</th> 
  6.                          <th>Created</th>
  7.                          <th>Description</th>
  8.                          <th class="pull-left">Address</th>
  9.                     </tr>
  10.                 </thead>
  11.                       <tbody>
  12.                               <tr>
  13.                                  <td><input type='checkbox' id='eventSelect' /></td>
  14.                                  <td>%php code show EventID%</td>
  15.                                  <td>%php code  show EventStartDate%</td>
  16.                                  <td>%php code  show Description%</td>
  17.                                  <td>%php code % show ServiceAddress%</td>
  18.                                  
  19.                                     <td>
  20.                                           <table id="productList">
  21.                                                 <th>                                                
  22.                                     <tr>
  23.                                         <td>%php code% show ProductName</td>";
  24.                                         <td class='totalDiv pull-right'>%php code show Total%</td>";
  25.                                     </tr>
  26.                   </table
  27.                   </td>
  28.             </tr>
  29.       </tbody>
  30.  </table>

My code :

  1. $('#eventsToList').click(function () {
  2.                           $('input[type=checkbox]').each(function () {
  3.                               if ($(this).is(":checked")) 
  4.                            {
  5.                                $(".totalDiv").each(function() {
  6.                                });
  7.                          }
  8.                      });             
  9. //save total to input box
  10.         });           
Here is one of my many attempts, it loops through all the <td> elements with the totalDiv class even if they are not in the selected row . I just want to get the value of <td> elements of the selected row where the class is totalDiv, and I want to allow the user to select any number of rows from the main table. I will save the total in an element after each click

Its ultimately building an invoice.I want to be clear on what the fix is so I prefer not use plugins, as I am trying to get better at this, I have tried for hours to figure this out on my own and would be very happy for any help.