Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="//code.jquery.com/jquery-2.1.1.min.js"></script>
  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body>
<p>
  Number of rows in second tbody: <span id="total"></span>
</p>
<table>
  <tbody>
    <tr>
      <td>
        <table>
          <tbody>
            <tr>
              <td>1</td>
            </tr>
            <tr>
              <td>2</td>
            </tr>  
          </tbody>
        </table>
      </td>
    </tr>
  </tbody>
</table>
  
<script>
 $('#total').text($('tbody tbody tr').length);
</script>
  
</body>
</html>
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers