javascript links same number as div
<pre><code>&lt;div class="slider"&gt;
    &lt;div class="slide"&gt;
         ..//
    &lt;/div&gt;

    &lt;div class="slide"&gt;
         ..//
    &lt;/div&gt;

    &lt;div class="slide"&gt;
         ..//
    &lt;/div&gt;

    &lt;ul class="pagination"&gt;
        &lt;li&gt;&lt;a href="#"&gt;&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="#"&gt;&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="#"&gt;&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
&lt;/div&gt;
</code></pre>

<p>I want to make the number of <code>li</code> the same as the number of <code>slide</code> with javascript/jquery</p>

<p>I tried this but it doesn't seem to work</p>

<pre><code>var pagination = $('.pagination li a').size();
var slides = $('.slide').size();

$(function(){
 pagination=slides;
});
</code></pre>

<p>This is my real question, if I have more then one slider, how can i make the number of links inside of the div to be equal to the slides inside the <code>div class="slider"</code> not all the slides in the page</p>

<p>In other words if I have the html i typed and i have another structure like this one but with more/less <code>div class="slide"</code> how can i make the links in the pagination equal to the number of thos divs</p>
