+ 1
Automatically close a banner
Hey Guys. I'm new in JavaScript. I have a banner in my website, the banner Id is #advt. I need a js code to close banner after a while. but I don't know how to use setTimeout to take action like display:none; for that banner Id. Pls help.
2 Réponses
+ 3
setTimeout(function() {
$('#advt').fadeOut('fast');
}, 2000); //
or
var = document.getElementById("advt");
advt.style.display = "none";
0
Thanks, but its doesn't work.
Any suggestions?