Browse Source

Typically, js is loaded at the bottom

Kevin van Zonneveld 9 years ago
parent
commit
db69cb4a30
1 changed files with 9 additions and 5 deletions
  1. 9 5
      website/src/examples/cdn/app.html

+ 9 - 5
website/src/examples/cdn/app.html

@@ -1,9 +1,13 @@
-<script src="/js/uppy.js"></script>
+<link rel="stylesheet" href="/css/uppy.css">
 
 <script>
-var uppy = new Uppy.Core();
-uppy.use(Uppy.plugins.Tus10);
+document.addEventListener('DOMContentLoaded', function(event) {
+  var uppy = new Uppy.Core();
+  uppy.use(Uppy.plugins.Tus10);
 
-console.log(uppy.type);
-console.log('Uppy loaded from CDN with a tus 1.0 plugin');
+  console.log(uppy.type);
+  console.log('Uppy loaded from CDN with a tus 1.0 plugin');
+});
 </script>
+
+<script src="/js/uppy.js"></script>