Hi,
I've got a probably rather simple syntax question but I can't seem
to find a solution.
That I want to do is a adding a class to all ing tags within a
servant container. With that class on I apply a transition and the
images fade it. Just that would be easy. But to have a nicer effect I
want to fade the images in with a slight delay so the effect of a
"wave" is created. I idea to archive that is to add
the classes (that make the image appear) with a slide delay using a
setTimeout function.
My problem is, that I can't find a way to parse the jQuery(this)
element from the each() loop into the setTimeout function...
My current code looks like this:
jQuery('#ci-company-life-table td img').each(function(){
$this = jQuery(this);
setTimeout(function($this){
jQuery(this).addClass('ci-fade-in');
}, 100);
});
$this inside the function is always 'undefined'.
Any help would be very appreciated.
Thanks in advance!