So I have a project, where it will append Jquery to the website. For some odd reason, the append isn’t working, and the jquery script isn’t running.
Hi @DaxCodes thanks for your question. Can you share a link to the Repl please so we can see the error?
I’m super sorry, but I actually went to a different solution. Apologies!
In the regular thing, it would result in a error:
$ is not defined!
I know you’ve solved this, but just looking at the code, you’re appending a string to the head of the document, not a script tag.
You’d need to create a script element, then set its attributes and then append that to the document’s head:
const script = document.createElement("script");
// note that you could use script.type and script.src, but using the setAttribute method is considered better practice