Getting .animate() and .data() to work together
<p>I'm trying to get the following code to work:</p>

<p>There's this strange issue, the second .animate does not work when I use elem.data to get the values, whereas when I use mention the values specifically such as <code>"left" : "200px"</code> it seems to work.</p>

<p>I've checked the existence of <code>elem.data('prevLeft')</code> and <code>elem.data('prevTop')</code> by using <code>console.log()</code> just before the code mentioned below and these values exist and are correct.</p>

<pre><code>elem.animate({"width":"200px"},3000).animate({
    "left": elem.data('prevLeft'),
    "top": elem.data('prevTop')
 },2000);
</code></pre>

<p>What seems to be the problem, and is there no way I can pass values stored in a variable to the <code>.animate()</code> function?</p>

<hr>

<p>A Stray function was resetting the values, and <em>that</em> is why it wasn't working.
I retried all the methods mentioned and all of them worked.</p>

<p>Sorry for all the trouble.</p>
