I'm working on a webapp for iPad with jQtouch and jQuery. The webapp is used in a store and viewed through AVD browse which send me email alerts when the device is shook or disconnected from power. However, I also want to know when the webapp has been closed. I tried to use $(window).bind('unload', function(){}); but it doesn't work neither in Safari Mobile nor AVD browse. How can I get it to work?
相关问题
- How to fix IE ClearType + jQuery opacity problem i
- jQuery add and remove delay
- Include empty value fields in jQuery .serialize()
- Disable Browser onUnload on certain links?
- how to get selected text from iframe with javascri
I have an answer. It's not what we were hoping for.
The technical definition of unload from http://www.w3.org/TR/DOM-Level-2-Events/events.html is:
I also got a reply from some in the know at Apple: "Unfortunately, I haven't been able to find an event that fires when the Home button is clicked! I think the most appropriate event for this might be the pagehide event. This event actually does fire in Safari on iOS when you switch to the "tabs" view to open a new page, but not when you click the home screen icon :-("