title: How to determine if a row is visible in datatables
body: <p>I am trying to figure out how to determine whether a row is visible inside the jquery datatables. </p>
  
  <p>I want to be able to navigate the datatables viewport using pageup/down buttons. when the window resolution changes, so does the viewport height of the datatables. I need to make sure that no row is shown only partially so that way when I page down in the table, the bottom row goes to the top of the table fully and not partially. </p>
  
  <p>any thoughts on this? 
  thanks in advance</p>
  
  <p>edit: some code that I am working with. Note that I am using a ScrollTo plugin to scroll to a specific tr in the datatable. </p>
  
  <pre><code>                makeTableScroller = function () {
          offset = 0;
          return function (tableInfo) {
              var tableId = tableInfo.tableId;
              var containerTop = 0; 
              var containerBottom = containerTop + $(tableInfo.tableId).height();
              var tableHeight = containerTop + containerBottom;
              var totalItemsInTable = tableInfo.settings.fnRecordsDisplay();
              var totalAvailableRows = $(tableInfo.tableId).find('tr').length;
              var rowHeight = tableInfo.settings.oScroller.s.rowHeight;
              var scrollBy = Math.floor(tableHeight / rowHeight);
              scrollBy = Math.floor(totalAvailableRows / scrollBy);
  
              if (tableInfo.event.keyCode === KeyCodes.PageDown) {
                  offset += scrollBy;
                  console.log(offset);
              }
              else if (tableInfo.event.keyCode === KeyCodes.PageUp) {
                  if (offset - scrollBy &lt;= 1) {
                      offset = 1;
                  }
                  else {
                      offset -= scrollBy - 1;
                  }
                  if (offset === 1) {
                      $(tableId).scrollTop(offset);
                  }
              }
  
              $(tableId).find('tr:eq(' + offset + ')').ScrollTo();
          }
      }
  </code></pre>