jQuery variable and execution delay
<p>First of all, sorry for the confusing title. I am running into kind of a silly problem in jQuery. Here's my code:</p>

<pre><code>$j('.parent').hover(function(){
     var newWidth = $j(this).find('img').length * 70; // I need number of images within parent and multiply it by 70
     $j(this).stop().animate({'width':newWidth},700); // &lt;-- This does not work
}, function(){
     $j(this).stop().animate({'width':'70'},700); // Back to original width
});
</code></pre>

<p>But the there's no animation. If I alert the newWidth, it gives me correct answer. I suspect that the animation is executed simultaneously while the value is being assigned to newWidth and hence, nothing happens. Do i need to add delay between assigning variable and executing animation. Is there another efficient way?</p>

<p>UPDATE: The css of the .parent is <strong>inline</strong> and it is following: </p>

<pre><code>element.style {
background-color: #000000;
border-color: #CCCCCC;
border-radius: 0 0 0 0;
border-style: solid;
border-width: 0;
clear: both;
height: 75px;
overflow: hidden;
padding: 0;
position: relative;
width: 70px;
}
</code></pre>
