django - JQuery is not defined when using document ready -


i facing strange behavior trying execute the:

$(document).ready(function() { 

with jquery.

i have script in right inside a:

  window.addeventlistener 

inside script use repeatedly jquery. want replace window.addeventlistener:

window.addeventlistener("map:init", function (e) { 

with:

$('#add_geometry').on(("map:init", function (e) { 

and want include script inside the:

$(document).ready(function() { 

when try error in console:

uncaught referenceerror: $ not defined 

i know jquery loaded on time. application build django, not sure if issue related this

i tried recommendations in above link didn't work. missing basic here?

please add jquery file in code.

it seems have not reference jquery file in page before jquery code execute. 

you can add below code.

<script src="~/scripts/jquery-1.8.2.js"></script> 

Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -