Solution:1
You’re using jQuery in compatibility mode.
When you use it like that, jQuery is not define as “$” (because other frameworks like to use this var name).
You should change your jQuery file or simply use this piece of code:
var $ = jQuery;
You can also use “jQuery” instead of “$”.