Datatables Switch between pages automatically
<p>I am trying to switch between Datatables pages automatically but I don't seem to be able to get it working. I either get a long running script and If I try adding a delay I get the following error:</p>

<blockquote>
  <p>table.page(...).draw(...).delay is not a function</p>
</blockquote>

<p>Below is my code that I am using.</p>

<pre><code>$(document).ready(function () {
                var table = $('#calendarView').DataTable({
                });
                var pages = table.page.info().length;
                    for (i = 0; i &lt;= pages; i++) {
                       table.page(i).draw();
                       if(i===pages){
                           i=0;
                       }
                    }


            });
</code></pre>