Check out this tutorial:
http://devcenter.appery.io/tutorials/...
Basically paste the JS into a JS file and run 3 different events that each execute a function defined in the JS file. Device ready, deviceOnline and deviceOffline. Near lines 120 in the JS file, you will see. $('[dsid="footer"]').text('Online');
If you followed the whole tutorial then your footer will have the name "footer" and that code will change its text.
In an action that you want to execute, add JS on click event(or whatever it is):
var status = $('[dsid="footer"]').text();
if (status==="Online") {
Appery.navigateTo('page_name');
}
if (status==="Offline") {
alert( "no internet connection exists");
}
This should work for you, just follow the tutorial from the start and ignore the actual to do list parts.