12-09-2007, 05:05 PM
|
#1 (permalink)
|
|
The Acquainted
Join Date: Sep 2007
Posts: 133
Thanks: 6
|
Magic Div's
Hey,
I wanted to try and make it so that, if someone clicked a link then it'd wait 3 seconds then make a certain div disappear.
I have this code:
Code:
function hideElement(obj){
document.getElementById(obj).style.display = "none";
}
And this on the link itself (in an on click):
Code:
window.setTimeout(hideElement(admin2), 3000);
But it just produces an error, as in it does nothing.
Any ideas?
Thanks.
|
|
|