I’m having a silly issue, probably bad coding practice?? I have two setTimeout functions, one running after the other (which I think should be possible by this example ).
The first will show an element after the set delay period and the other will hide it once the duration is reached.
The first timeout executes fine, but the second never seems to run. I’m using timeout to avoid the shorter “delay” restrictions on EffectOptions
Any thoughts as to why my second timeout isn’t completing? I don’t believe setInterval to be appropriate in this situation as they must perform separate functions only once.
The element #notificationCTA is set to hidden on load.
Note: This method may cause performance issues, especially when used on many elements. If you’re encountering such issues, use performance testing tools to determine whether this method is causing them.
You should be able to get it to working by using the following, however: