-
-
Save purplecabbage/2830156 to your computer and use it in GitHub Desktop.
Hello World Cordova
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(win, doc){ | |
var onDeviceReady = function() { | |
console.log('Cordova initialized'); | |
doc.getElementById('infoTag').innerHTML = 'Hello world from Cordova ' + device.cordova; | |
} | |
doc.addEventListener('deviceready', onDeviceReady, true); | |
})(window,document); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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"> | |
<script type="text/javascript" src="cordova-x.x.x.js"></script> | |
<script type="text/javascript" src="hello-world.js"></script> | |
<title>Hello Cordova</title> | |
</head> | |
<body> | |
<h1 id='infoTag'>Initializing...</h1> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment