Javascript delay
Javascript delay
- Started
- Last post
- 7 Responses
- juhls
Hi.
How can I add a delay to this so that, when a user clicks on the menu header, it does not open up right away? Instead, there should be a 1 second delay. Otherwise, if the user hovers over objects too quickly, everything becomes frantic and glitchy.
- chrisone0
Google setInterval.
- chrisone0
Listen to ornj, not to me.
- rounce0
You're passing in the function as a string, not a function. just call it like you normally would. Also slap a boolean in there to check if the accordion is open or else it'll try to animate it every 100 ms.
- rounce0
Oh shit, sorry Jaline. I totally forgot about this. I'll email you back with the new pastebin url and an explanation.