i have the following code for multiple flyers that when clicked will display a help text overlay that goes away after 4 seconds. I can get it to show the help text but the timeout doesnt work.
$(".flyercontainer").click(function(){
$(this).children('.flyerHelp').css('opacity',0.8);
setTimeout(function(){
$(this).children('.flyerHelp').css('opacity',0);
},4000);
})
thanks for your help.
The
thisin yoursetTimeOut()‘s callback is not what you think it is (it points to the global object,window).