Skip to content

Instantly share code, notes, and snippets.

@JiaminXuan
Created April 29, 2015 20:14
Show Gist options
  • Save JiaminXuan/700d3fe10d20d704fa66 to your computer and use it in GitHub Desktop.
Save JiaminXuan/700d3fe10d20d704fa66 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<title>Pause Example</title>
<script type="text/javascript" charset="utf-8" src="cordova-2.9.0.js"></script>
<script type="text/javascript" charset="utf-8">
// Wait for device API libraries to load
//
function onLoad() {
document.addEventListener("deviceready", onDeviceReady, false);
}
// device APIs are available
//
function onDeviceReady() {
document.addEventListener("pause", onPause, false);
}
// Handle the pause event
//
function onPause() {
}
</script>
</head>
<body onload="onLoad()">
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment