title: How to use a variable for a key in a JavaScript object literal?
body: <p>Why does the following work?</p>
  
  <pre><code>&lt;something&gt;.stop().animate(
      { 'top' : 10 }, 10
  );
  </code></pre>
  
  <p>Whereas this doesn't work:</p>
  
  <pre><code>var thetop = 'top';
  &lt;something&gt;.stop().animate(
      { thetop : 10 }, 10
  );
  </code></pre>
  
  <p>To make it even clearer: At the moment I'm not able to pass a CSS property to the animate function as a variable.</p>