![]() |
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){Code:
window.setTimeout(hideElement(admin2), 3000);Any ideas? Thanks. |
Try setting your window.setTimeout to a var, but I'm curious, what's the error it's giving you?
Also, you may want to just setTimeout, not window.setTimeout. |
Well, internet explorer gives the error of
Quote:
|
javascript Code:
|
Gah, I thought it was missing quotes too. Shows how much JS I've done lately.
|
That gives a syntax error. It works without the " but it happens instantly.
|
JavaScript Code:
|
Nevermind, I wasn't doing it right and Salathe beat me to it.
Edit: Just in case... javascript Code:
|
Thanks a lot, it works great :D
|
| All times are GMT. The time now is 12:30 PM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0