jQuery auto play script of pagination
<p><strong>My Script :</strong></p>

<pre><code>function pagination(id)
    {

    $("#article_load_destacados").load("indexer_destacados_news.php?pg_d="+id);


    if (id+1&gt;2)
    {        
       pagination(0);

       setInterval(function() 
       {
          pagination(0);
        }, 4000);        
    }
    else
    {        
       setInterval(function() 
       {
         pagination(id+1);
       }, 4000);        
    }
    }

    &lt;/script&gt;

    &lt;div id="article_load_destacados"&gt;&lt;/div&gt;

    &lt;script&gt;
    pagination(0);
    &lt;/script&gt;
</code></pre>

<p>Create this script for show pagination, the script call PHP file and load this with pagination, for this send different ids and when load PHP file load the same time different elements of pagination. With this script I want run all pagination based on id. If I have for example 5 pages, the script run from 0 to 5, I use for <code>setInterval</code> for it with jQuery.</p>

<p>I want get the script paginate and send different id each 4 seconds.
The problem when run the script the navigator doesn't work, and generates an infinite loop. </p>
