Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function onLoad() {
- document.addEventListener("deviceready", onDeviceReady, false);
- }
- // Cordova is loaded and it is now safe to make calls Cordova methods
- //
- function onDeviceReady() {
- alert('omar');
- }
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <title>Hello World</title>
- </head>
- <body>
- <div class="app">
- <h1>AAAA</h1>
- </div>
- <script type="text/javascript" src="cordova-2.2.0.js"></script>
- <script type="text/javascript" src="js/index.js"></script>
- </body>
- </html>
- <body onload="onLoad">
- function onLoad() {
- document.addEventListener("deviceready", onDeviceReady, false);
- }
- function onDeviceReady() {
- //anything you want done after deviceready has fired
- }
- $(document).ready() {
- document.addEventListener("deviceready", onDeviceReady, false);
- }
- function onDeviceReady() {
- //anything you want done after deviceready has fired
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement