Nobody should EVER learn jQuery for anything more than knowing how to rip it out of a site by the nerts. It is a train wreck laundry-list of broken practices. Look no further than your own example where you're using innerHTML style methodology instead of ACTUALLY using the DOM. Aka "security what's that" and triggering the parser which can take 100 times or more the time to complete...

).textContent = 'Hello World';
/* remember, appendChild and insertBefore return the inserted element!

Executes faster, and has clear verbose code. And if you want it shorter, use the (d) == document trick in a IIFE.

... and if like a good little doobie you placed your script right before </body> you would likely not need to wait for onload/ready/whatever!

Most everything I've ever seen built with jQuery can be put into one of three categories:

1) Stuff that would be a fraction the code NOT counting the size of the dipshit "framework' against it.

2) Stuff that is HTML or CSS' job.

3) Stuff that has zero damned business on a client-facing website.

It is such an incompetent dungheap of ****wittery, I cannot fathom how anyone ever used it by choice! This is even more true in 2020 with most of the handful of things it did provide of value now being quite easily handled without any scripting whatsoever!

But with the industry’s love-affair with this trash, it’s hardly a shock nubes and rubes alike are so easily suckered by even bigger steaming piles of manure like React, Vue, or Angular. All because most of the fanboys of this halfwit trash never learned enough HTML, CSS, or JavaScript in the first place to even recognize what utter and complete garbage all these “frameworks” are.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store