giving top positions to li using variables in jquery
<p>hello friends i want to set position to every <code>&lt;li&gt;</code> using jquery i have tried following code but its not working as i want </p>

<pre><code>&lt;script&gt;
$(document).ready(function(){

var t = 10;
var j = 0;

function cycle(){

var l = $('ul#move li').length - 1;
alert(l);
 $('ul#move li:eq('+j+')').css('top',t + 'px');

 if(j == l)

 {
     j=0;
     t = 10;
 } 
 else
 {
 j++;
 t = t+10;
 }

cycle();
}
})
&lt;/script&gt;
</code></pre>

<p>html</p>

<pre><code>&lt;ul id="move"&gt;
  &lt;li&gt;one&lt;/li&gt;
  &lt;li&gt;two&lt;/li&gt;
  &lt;li&gt;three&lt;/li&gt;
  &lt;li&gt;four&lt;/li&gt;
  &lt;li&gt;five&lt;/li&gt;
  &lt;li&gt;six&lt;/li&gt;
&lt;/ul&gt;
</code></pre>

<p>CSS</p>

<pre><code>&lt;style&gt;
ul#move
{
    position:relative;
    width:300px;
    border:solid;
    font-size:3em;
    height:300px;
}
ul#move li
{
    list-style:none;
    margin:0;
    padding:10px;
    position:absolute;
}
&lt;/style&gt;
</code></pre>

<p>i want to set top positions to every <code>&lt;li&gt;</code> the gap shuld be 10 px in every <code>&lt;li&gt;</code></p>

<p>Please help </p>

<p>thanks in advance</p>
