Advertisement
Guest User

Untitled

a guest
Oct 31st, 2014
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. function onLoad() {
  2. document.addEventListener("deviceready", onDeviceReady, false);
  3. }
  4.  
  5. // Cordova is loaded and it is now safe to make calls Cordova methods
  6. //
  7. function onDeviceReady() {
  8. alert('omar');
  9. }
  10.  
  11. <html>
  12. <head>
  13. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  14. <title>Hello World</title>
  15. </head>
  16. <body>
  17. <div class="app">
  18. <h1>AAAA</h1>
  19. </div>
  20. <script type="text/javascript" src="cordova-2.2.0.js"></script>
  21. <script type="text/javascript" src="js/index.js"></script>
  22.  
  23. </body>
  24. </html>
  25.  
  26. <body onload="onLoad">
  27.  
  28. function onLoad() {
  29. document.addEventListener("deviceready", onDeviceReady, false);
  30. }
  31.  
  32. function onDeviceReady() {
  33. //anything you want done after deviceready has fired
  34. }
  35.  
  36. $(document).ready() {
  37. document.addEventListener("deviceready", onDeviceReady, false);
  38. }
  39.  
  40. function onDeviceReady() {
  41. //anything you want done after deviceready has fired
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement