Entries tagged js | Hugonweb Annotated Link Bibliography

Simple live reload for developing static sites

https://leanrada.com/notes/simple-live-reload/

I could use this backend-agnostic script. Right now I just spam Ctrl-R!

Triggering Javascript at the Right Moment

https://stackoverflow.com/a/36096571

The best way to run javascript is in the head with the "defer" attribute. That immediately starts fetching the script, but waits to execute it until the whole page is parsed.

<!DOCTYPE html>
<html>
<head>
  <title>Title</title>
  <meta charset="UTF-8">
  <script src="blahblah.js" defer></script>
</head>
<body>

<p>Stuff here</p>

</body>
</html>