<...">

How can I find the last child of a particular type (table) using jQuery?

let's say I have the following structure:

  <div id="main">
    <table> 
       <tbody>
          <tr>
            <td>
               <div>
                 <table> 
                   <tbody>
                      <tr>
                        <td>
                           <div><table>Last table here</table></div>
                        </td>
                      </tr>
                   </tbody>
                 </table>
               </div>
             </td>
          </tr>
       </tbody>
    </table>
  </div>

      

How do I find that very last table?

+3


source to share


1 answer


Try the following:



$("#main table:last")

      

+18


source







All Articles