Skip to content

Instantly share code, notes, and snippets.

@brianleroux
Forked from purdrew/helloCordova.html
Created May 29, 2012 20:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brianleroux/2830598 to your computer and use it in GitHub Desktop.
Save brianleroux/2830598 to your computer and use it in GitHub Desktop.
Hello World Cordova
<!DOCTYPE html>
<html>
<head>
<meta http-equiv=Content-Type content=text/html;charset=UTF-8>
<meta name=viewport id=viewport content=width=device-width,height=device-height,initial-scale=1.0,user-scalable=no>
<title>Hello Cordova</title>
</head>
<body>
<h1 id=hello>Initializing...</h1>
<script src=cordova-1.7.0.js></script>
<script>
function deviceInfo() {
console.log('Cordova initialized')
document.getElementById('hello').innerHTML = 'Hello world from Cordova ' + device.cordova
}
document.addEventListener('deviceready', deviceInfo, true)
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment