How can I pass function arguments to jquery .animate?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/13236473/using-a-dynamic-variable-as-object-literal-jquery-animate-function">Using a dynamic variable as object literal, jQuery animate function</a>  </p>
</blockquote>



<p>I'm attempting to pass a function argument as a setting for a jquery animation except I cannot get it working. </p>

<p>The Function</p>

<pre><code>function gridClick(a, b){
    $(c).animate({
        a : 0,
        b : 0
    }, 10000)
};
</code></pre>

<p>calling the function </p>

<pre><code>gridClick('top', 'left', this);
</code></pre>

<p>console log shows that a and b are being put out as top and left but they are not actually affecting the animation as top and left. Is this a syntax error or is there more going on?</p>
