I want to fade out an element and all its child elements after a delay of a few seconds. but I haven\'t found a way to specify that an effect should start after a specified
You can avoid using setTimeout by using the fadeTo() method, and setting a 5 second delay on that.
$("#hideAfterFiveSeconds").click(function(){ $(this).fadeTo(5000,1,function(){ $(this).fadeOut("slow"); }); });