using for loop in jquery
<pre><code>$(document).ready(function()
{
    $for(i=1;i&lt;8;i++)
    {
        $("#"+i).hover(function() {
             $("#"+i).stop().animate({left:"50px"});
        },
        function() {
             $("#"+i).stop().animate({left:"30px"});
        });
    } 
 });
</code></pre>

<p>I used for loop here to avoid multiple declaration of hover 
function it doesnt work how can i declare my div id my div id was 1-7.plz tell me how 
i should use the div ids inside the loop.</p>
