Fix blocking Javascript

This commit is contained in:
rubenwardy 2017-08-27 19:47:29 +01:00
parent 7014478d15
commit 4822793af9
2 changed files with 26 additions and 15 deletions

View File

@ -1,7 +1,7 @@
</div> </div>
</div> </div>
<script src="https://code.jquery.com/jquery-1.11.2.min.js"></script>
<script src="{{ page.root }}static/script.js"></script>
<link rel="stylesheet" href="{{ page.root }}static/style.css"> <link rel="stylesheet" href="{{ page.root }}static/style.css">
<script async src="https://code.jquery.com/jquery-1.11.2.min.js"></script>
<script async src="{{ page.root }}static/script.js"></script>
</body> </body>
</html> </html>

View File

@ -1,6 +1,13 @@
// @license magnet:?xt=urn:btih:90dc5c0be029de84e523b9b3922520e79e0e6f08&dn=cc0.txt CC0 // @license magnet:?xt=urn:btih:90dc5c0be029de84e523b9b3922520e79e0e6f08&dn=cc0.txt CC0
// This script is licensed under CC0 // This script is licensed under CC0
(function() {
function setJQueryTrigger() {
if (window.$ == undefined) {
setTimeout(setJQueryTrigger, 70);
return;
}
$(function() { $(function() {
$("#printable").click(function() { $("#printable").click(function() {
$("body").addClass("printable"); $("body").addClass("printable");
@ -15,5 +22,9 @@ $(function() {
} }
}); });
}); });
}
setJQueryTrigger();
})();
// @license-end // @license-end