title: Get table row by row index jquery
body: <p>I want to access row in my table using the row index.</p>
  
  <p>When I try to get the row by is index I get :</p>
  
  <pre><code>Uncaught TypeError: undefined is not a function 
  </code></pre>
  
  <p>This is my code:</p>
  
  <pre><code>function moveUpMuscle(muscleIdFrom, muscleOrderFrom, index)
  {
  
      if(index == 0)
      {
          alert("Muscle is already at the top of the list");
          return;
      }
  
      table = $("#muslce_order_table");
  
      console.log(table == null ? "null" : "not null");
  
      row = table.rows(index);
  
      muscleIdTo = row.attr("data-id");
      muscleOrderTo = row.attr("data-order");
  
      console.log("muscleIdFrom " + muscleIdFrom + " muscleOrderFrom " + muscleOrderFrom);
      console.log("muscleIdTo " + muscleIdTo + " muscleOrderTo " + muscleOrderTo);
  
  }
  </code></pre>
  
  <p>The error points to this line:</p>
  
  <pre><code> row = table.rows(index);
  </code></pre>
  
  <p>In my console the log is "not null" so the <code>table</code> element is not undefined.</p>