How To Properly Add jQuery Scripts To WordPress

WordPress has been in our lives for over 16 years, yet the method of adding scripts to themes and plugins still remains a mystery for many developers. In this article we finally put the confusion to rest.
Since it’s one of the most commonly used Javascript libraries, today we’re discussing how to add simple jQuery scripts to your WordPress themes or plugins.
But first…
About jQuery’s Compatibility Mode
Before we start attaching scripts to WordPress, it’s important to understand jQuery’s compatibility mode.
As you’re probably