I'm seriously struggling today.
I need to pass a variable, or even better an object, into a timeOut as such (example) :
$('.x').each(function()
{
setTimeout(function()
{
alert ($(this).attr('id'))
},10000);
});
Obviously what happens is that the timeOut doesn't have reference to the original $(this)
Help ?