title: Not able to get element by id in DataTables
body: <p>I am trying to scroll to a row with a specific id in DataTable. following is the code for it.</p>
  
  <pre><code>function scroll_row(int_id) {
      var obj_element = document.getElementById(int_id);
      if(obj_element != null) {
          var int_scroll_pos = obj_element.offsetTop;
          $('#myTable').parent().scrollTop(int_scroll_pos-10);
      } 
  }
  </code></pre>
  
  <p>But the problem with this is that the <code>obj_element</code> is giving me null while getting it by id.</p>
  
  <p>For example if I have 50 rows in my data-table and I try to give the id of the 40th element while scroll being at the top it returns me null.</p>
  
  <p>But when I scroll down somewhere near to that element. It returns the value for getElementById as it should.</p>
  
  <p>I don't know what's the problem here. Anyone knows about this?</p>
  
  <p>I also tried it doing this way <a href="https://datatables.net/forums/discussion/33/using-fngetposition-to-find-a-tr-by-id" rel="nofollow">https://datatables.net/forums/discussion/33/using-fngetposition-to-find-a-tr-by-id</a></p>
  
  <pre><code>$("#myTable").fnGetPosition(document.getElementById("262617"))
  </code></pre>
  
  <p>but in this case also it says fnGetPosition is not a function.</p>
  
  <p>This is how my datatable is</p>
  
  <pre><code>tableSettings = {
  
  ... 
  
  }
  
  var myTable = $('#myTable').DataTable(tableSettings);
  </code></pre>
  
  <p>I am not able to understand what is happening in both the cases I mentioned. Hoping to get some help. Thanks :)</p>
  
  <p>Edit - Adding an image with example</p>
  
  <p><a href="http://i.stack.imgur.com/NUiN0.png" rel="nofollow">image with html</a></p>
  
  <p>The one with id = 140876 is the last tr row of the datatable. If I'm scrolled up top to the first element of the datatable and try document.getElementById("140876") it gives me null. But I get the value if I'm scrolled down to the bottom. Same goes for every other row. The rows down are returning null when I'm scrolled up.</p>
  
  <p>P.S. had to remove the first image as right now I'm only allowed to add 1 link.</p>