https://www.virendrachandak.com/techtalk/wordpress-is-not-defined-even-if-jquery-is-loaded/
WordPress $ is not defined even if jQuery is loaded