What is the easiest way to check whether the device(smartphone) is online or offline. I\'m working with phonegap, jquery mobile. I found this one.
document.ad