jQuery $ is not a function in WordPress

Getting a jQuery error that $ (dollar sign) is not a function in your WordPress website? All you may need is to define $() as jQuery().

Fixing $ is not a function

To fix the $ is not a function jQuery error, follow the steps below:

  1. Open the file containing your jQuery (you can locate this by clicking the error line in your inspector’s console).
  2. Replace all instances of $(…) with jQuery(…) in your code.
  3. Save, upload and test, but be sure to refresh your cache.

Note, you must stick with the same capitalisation when writing jQuery in your code.