Jquery Effect Onunload

Posted by j3frea on Stack Overflow See other posts from Stack Overflow or by j3frea
Published on 2009-06-17T12:27:37Z Indexed on 2010/05/17 0:10 UTC
Read the original article Hit count: 342

Filed under:
|
|
|

I would like to use the jquery slideUp effect when the user navigates away from the page just to make the page look cool as it closes.

I assume that I should use the onunload event but how can I delay the page closing long enough for the effect to run to completion.

One of the options that came to mind is effectively hijacking the page closing function, storing it in some variable and then executing it once I had run my effect but I have no idea how I would do that.

Any suggestions or alternative ideas are more than welcome

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jQuery