@IsaacT8
The contents of the post @ KadenceThemes, other than the OP, is restricted to members only, so we can’t see what others have said :-).
That said, since this seems to be a WordPress installation (please correct me if I’m wrong), do you by chance have a caching plugin installed (such as W3 Total Cache, WP Super Cache etc)?
If yes, jQuery is often minified / compressed and if not by default (as per your theme configuration), the plugin will often place .js
files in the footer. An async
or defer
tag could be added to the call as well in an attempt to speed up page loads.
If you see:
<script defer src="...."></script>
or
<script async src="...."></script>
… in your HTML source code / output (when viewing the page source), chances are this is where the issue is.
Adding to the stack, WordPress also prioritizes their own packaged version of jQuery over yours (if you’ve defined a custom version without using a plugin that auto-replaces the instance for you). This means that you’ll often have to use another identifier when calling jQuery functions.
What I mean by this is that you may run in to issues using $
when calling jQuery functions. Instead, you’d need to use something such as:
jQuery( document ).ready( function() {
....
});
instead of:
$( document ).ready( function() {
....
});
–
While I do like WordPress, they do things a little differently than you’d expect in some cases; this is one of them.
–
That said, even with the DigitalOcean WordPress image (if that’s what you’re using), you’re running a stock installation on a Droplet (VPS) that is configured specifically to run WordPress, with nothing more (and nothing less, of course :-)). The Droplet, OS and stock installation would not contribute to this sort of an issue.