tags:

views:

53

answers:

2

How can I trigger a slideUp(); with a delayed start, but which doesn't force the rest of the code to wait until it has finished before progressing.

eg: A button is pressed and 1 second later a box disappears, but jquery is still working during that one second.

+2  A: 

See this previous SO question on exactly the same topic.

setTimeout(function() { /* code to run */ }, delay_time_in_milliseconds);
Amber
Sorry. Well found.
Patrick Beardmore
No need to apologize. :)
Amber
+2  A: 

You can use Javascript's setTimeout() function for this.

E.g.

setTimeout(function() { $('#someid').slideUp(); }, 1000); // 1000ms = 1sec.
BalusC