I do not understand how to use jQuery with WordPress
-
I’ve read all the documentation on the WordPress site multiple times, read dozens of tutorials, watched videos on Youtube, and tried various plugins, and I cannot figure out how to use jQuery with WordPress. I get that it’s included with WordPress but has to be “enqueued.” I sort of understand what that means.
I’ve got a rough version of what I am trying to do working in JsFiddle: https://jsfiddle.net/m388uxho/1/
I don’t get how to get this into WordPress. I have tried placing the code on the WordPress enqueue script Code Reference page in functions.php, in the header, and in the footer:
wp_enqueue_script( string $handle, string $src = '', array $deps = array(), string|bool|null $ver = false, bool $in_footer = false )
Can someone please take me to square one on how to “unlock” jQuery inside WordPress, and how I can actually implement this simple script on my page as I did in JsFiddle? I would be extremely grateful. Thank you.
- The topic ‘I do not understand how to use jQuery with WordPress’ is closed to new replies.