title: How i can set a selection for a row on a pagination page with datatables
body: <p>i trie do add a selection of a row for my datatables</p>
  <p>For the first page of pagination this code works</p>
  <pre><code>$( '#dt_row_id_'+myid ).addClass('selected');
  </code></pre>
  <p>If the selected row is not on first page of the pagination, it wont work.</p>
  <p><strong>How can i add the selection for a row on the other result pages?</strong></p>
  <p>Datatable Example</p>
  <pre><code>    &lt;table id=&quot;example&quot; class=&quot;table table-striped table-bordered&quot; cellspacing=&quot;0&quot; width=&quot;100%&quot;&gt;
              &lt;thead&gt;
                  &lt;tr&gt;
                  
                      &lt;th&gt;Name&lt;/th&gt;
                      &lt;th&gt;Position&lt;/th&gt;
                      &lt;th&gt;Office&lt;/th&gt;
                      &lt;th&gt;Age&lt;/th&gt;
                      &lt;th&gt;Start date&lt;/th&gt;
                      &lt;th&gt;Salary&lt;/th&gt;
                     &lt;th&gt;&lt;a href=&quot;#&quot; id=&quot;selectall&quot;&gt;Select all&lt;/a&gt;&lt;/th&gt;
                  &lt;/tr&gt;
              &lt;/thead&gt;
             
              &lt;tbody&gt;
                  &lt;tr id=&quot;dt_row_id_1&quot;&gt;
                      &lt;td&gt;Tiger Nixon&lt;/td&gt;
                      &lt;td&gt;System Architect&lt;/td&gt;
                      &lt;td&gt;Edinburgh&lt;/td&gt;
                      &lt;td&gt;61&lt;/td&gt;
                      &lt;td&gt;2011/04/25&lt;/td&gt;
                      &lt;td&gt;$320,800&lt;/td&gt;
                       &lt;td&gt; &lt;input type=&quot;checkbox&quot; class=&quot;record&quot;&gt;&lt;/td&gt;
                  &lt;/tr&gt;
  &lt;tr id=&quot;dt_row_id_2&quot;&gt;
                      &lt;td&gt;Tiger Nixon&lt;/td&gt;
                      &lt;td&gt;System Architect&lt;/td&gt;
                      &lt;td&gt;Edinburgh&lt;/td&gt;
                      &lt;td&gt;61&lt;/td&gt;
                      &lt;td&gt;2011/04/25&lt;/td&gt;
                      &lt;td&gt;$320,800&lt;/td&gt;
                       &lt;td&gt; &lt;input type=&quot;checkbox&quot; class=&quot;record&quot;&gt;&lt;/td&gt;
                  &lt;/tr&gt;
                  &lt;tr id=&quot;dt_row_id_3&quot;&gt;
                      &lt;td&gt;Tiger Nixon&lt;/td&gt;
                      &lt;td&gt;System Architect&lt;/td&gt;
                      &lt;td&gt;Edinburgh&lt;/td&gt;
                      &lt;td&gt;61&lt;/td&gt;
                      &lt;td&gt;2011/04/25&lt;/td&gt;
                      &lt;td&gt;$320,800&lt;/td&gt;
                       &lt;td&gt; &lt;input type=&quot;checkbox&quot; class=&quot;record&quot;&gt;&lt;/td&gt;
                  &lt;/tr&gt;
  ...
  </code></pre>