Permalink
Browse files

moved init code to bottom, so that canvas element is ready

  • Loading branch information...
rafd committed Sep 19, 2012
1 parent 2da4d7d commit 735b1aad1e8123c4309795c274e16c4a18c68408
Showing with 9 additions and 5 deletions.
  1. +9 −5 index.html
View
@@ -76,11 +76,7 @@
setupCAAT();
}
- if (typeof(AppMobi) === "undefined") {
- setupCAAT();
- } else {
- document.addEventListener("appMobi.device.ready",onDeviceReady,false);
- }
+
</script>
</head>
@@ -90,4 +86,12 @@
<canvas id="thecanvas"></canvas>
+ <script>
+ if (typeof(AppMobi) === "undefined") {
+ setupCAAT();
+ } else {
+ document.addEventListener("appMobi.device.ready",onDeviceReady,false);
+ }
+ </script>
+
</html>

0 comments on commit 735b1aa

Please sign in to comment.