Check Internet connectivity with jquery? Tamil Programmers
#behindthecode Check Internet connectivity with jquery? EXAMPLE 1 <script> var condition = navigator.onLine ? "online" : "offline"; if(condition == "online") { } </script> EXAMPLE 2 <html> <style> #status { position: fixed; width: 100%; font: bold 1em sans-serif; color: #FFF; padding: 0.5em; } #log { padding: 2.5em 0.5em 0.5em; font: 1em sans-serif; } .online { background: green; } .offline { background: red; } </style> <body> <div id="status"></div> <div id="log"></div> <p>This is a test</p> </body> </html> <script> window.addEventListener('load' , function() { var status = document.getElementById(" status"); var log = document.getElementById("log") ; function updateOnlineStatus(event) { ...