Check out this widget i believe it does exactly what you want. It adds classes to your page so you are able to display some warnings on screen. Still no active display though, For that you probably need to build your own widget. My guess is that this widget wraps some kind of phonegap function/widget that detects whether your device has connectivity.
Lex what about "pinging" one/multiple server(s) to check the app's connectivity; https://gist.github.com/madan712/4509039