From 2453368775399e9b1b5908a1ba80f212ecb97776 Mon Sep 17 00:00:00 2001 From: Zachary Vance Date: Fri, 18 Apr 2025 19:07:29 -0400 Subject: [PATCH] defer a script; jquery --- html-css-cheatsheet.html | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/html-css-cheatsheet.html b/html-css-cheatsheet.html index 0ce8ea7..9aae61e 100644 --- a/html-css-cheatsheet.html +++ b/html-css-cheatsheet.html @@ -3,7 +3,6 @@ @@ -185,9 +184,13 @@ <script src="jquery.min.js"></script> </head> <p>Hello World</p> -<script>$("p").css("color", "yellow");</script> +<script>$("p").css("color", "yellow");</script> +<script src="https://ajax.googleapis.com/ajax/libs + /jquery/3.7.1/jquery.min.js"></script> + JS is executed immediately. If your JS is included at the top of a file, delay it until document load: