Skip to content
Advertisement

Uncaught ReferenceError: $ is not defined in console

I am trying to append a div when a checkbox is selected in dajngo template but i keep receiving Uncaught ReferenceError: $ is not defined in the console

the template:

JavaScript

Advertisement

Answer

jquery in django is aliased to django.jQuery instead of $. If you want to use $ instead, you can do something like this:

JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement