Detecting Connection
Detecting Connection
i want to prevent the user from accessing a page in my mobile app unless the have a connection
i use this code but it doesnt seem to work
- $(document).ready(function()
- {
- $('.MainLink').click(function()
- {
- if (!window.navigator.onLine)
- {
- return false;
- }
- });
- });