Hi all,
i used sometimes a 'loading' method with the javascript onload & onunloadbody events.(www.restaurantebarocortico.com)
Now i'm learning jQuery, and i used the $(document).ready
& $(window).unload
to replace the old events, but the unload event isn't working correctly.
Does anybody knows another method to call a function on unload? And, if needed, a method to break the unload and do some effect (, i will need this to put an effect showing the loading div on unload).
the flow of the loading div:
- it appears on the top of everything (without effect) with an ajax-loader gif at the middle center.
- when document is ready, hide it with jQuery function (slow effect)
- when document/window is unloading, show it with jQuery function (slow effect again), and break for a while the event (or sleep the time of the effect).
Thanks and sorry my english :P José Moreira