How can I pass a variable into jQuery timeout
<p>I'm seriously struggling today. </p>

<p>I need to pass a variable, or even better an object, into a timeOut as such (example) : </p>

<pre><code>$('.x').each(function() 
{
  setTimeout(function()
  {
    alert ($(this).attr('id'))
  },10000);
});
</code></pre>

<p>Obviously what happens is that the timeOut doesn't have reference to the original <code>$(this)</code></p>

<p>Help ?</p>
