title: Jquery Datatables select row that is on other page than 1st
body: <p>Hi I have a datatable which is included like this </p>
  
  <pre><code>$('.bt-datatable').DataTable(
        {
          info: false,
          paging: true,
          pageLength: 5,
          "aoColumnDefs": [
            { "bSearchable": false, "aTargets": [ 1, 2, 3 ] }
          ]
        }
    );
  </code></pre>
  
  <p>And this is my datatable Html it has the loop coded in ruby language which creates the multiple rows according to the user records</p>
  
  <pre><code>&lt;div class="table-responsive"style="display: none"&gt;
            &lt;hr&gt;
            &lt;table class="bt-datatable table table-striped click-row-datatable" cellspacing="0" width="100%"&gt;
              &lt;thead&gt;
              &lt;tr&gt;
                &lt;th class="text-left"&gt;Name&lt;/th&gt;
                &lt;th class="text-left"&gt;Status&lt;/th&gt;
                &lt;th class="text-left"&gt;Start Date&lt;/th&gt;
              &lt;/tr&gt;
              &lt;/thead&gt;
              &lt;tbody&gt;
              &lt;%
                 @users.each do |user|
  
              %&gt;
                  &lt;tr class='clickable-row' rel="&lt;%= user.id %&gt;"&gt;
                    &lt;td class="text-left"&gt;&lt;%= user.name %&gt;&lt;/td&gt;
                    &lt;td class="text-left"&gt;&lt;%= user.status %&gt;&lt;/td&gt;
                    &lt;td class="text-left"&gt;&lt;%= user.start_time %&gt;&lt;/td&gt;
  
                  &lt;/tr&gt;
              &lt;% end %&gt;
              &lt;/tbody&gt;
            &lt;/table&gt;
          &lt;/div&gt;
  </code></pre>
  
  <p>i have a flash variable in ruby which is saved in <code>flash[:user_id]</code></p>
  
  <p>what i am doing is somehow i get the flash[:user_id] saved and according to that i wanna highlight the row whose rel attribute is equal to flash[:user_id]</p>
  
  <p>this is the javascript when the page loads</p>
  
  <pre><code>var ele = $('[rel="&lt;%= flash[:user_id] %&gt;"]');
      ele.addClass('bg-info');
  </code></pre>
  
  <p>the addClass is highlighting the the row in the datatable , but the issue i am facing is when the user id row is in lets say on the other page than 1st it does not loads the table on that page and not even highlighting, rather it only highlights when the that user is in the 1st page</p>