Nick and Justin have the right answers here, but since we're on the topic, I would recommend for portability to never use $ in the global area. A few too many libraries use it for their own purposes, and you may run into compatibility issues if you need to mix them. Instead, you can use the optional first parameter for the jQuery handler:
jQuery(function($) { });
This sets $ as a jQuery reference in this scope.
nickf Mar 05 2018-10-10T00: 00Z
source share