I have a list of several \'triggers\' (), each trigger shows a specific DIV, and each DIV has \'close\' button.
Now, I want to improve the us
Use setTimeout instead of delay.
Working demo: http://jsfiddle.net/J7qTy/
From jQuery delay documentation:
The .delay() method is best for delaying between queued jQuery effects. Because it is limited—it doesn't, for example, offer a way to cancel the delay—.delay() is not a replacement for JavaScript's native setTimeout function, which may be more appropriate for certain use cases.