FE/html

Uncaught TypeError: $.ajax is not a function

잔망루피 2022. 8. 4. 18:59
반응형

consol에 Uncaught TypeError: $.ajax is not a function 에러가 뜬다.

 

<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>

slim build를 사용해서 기능이 많이 빠진다.

 

 

✨ 해결

<script src="https://code.jquery.com/jquery-3.2.1.js" integrity="sha256-DZAnKJ/6XZ9si04Hgrsxu/8s717jcIzLy3oi35EouyE=" crossorigin="anonymous"></script>

uncompressed를 가져왔다.

 

 

 

참고 👇

https://releases.jquery.com/jquery/

 

jQuery Core – All Versions | jQuery CDN

jQuery Core – All Versions jQuery Core & Migrate - Git Builds UNSTABLE, NOT FOR PRODUCTION jQuery Core - All 3.x Versions jQuery Core 3.6.0 - uncompressed, minified, slim, slim minified jQuery Core 3.5.1 - uncompressed, minified, slim, slim minified jQue

releases.jquery.com

 

https://memostack.tistory.com/181

 

[오류 해결] $.ajax is not a function 해결 방법

Uncaught TypeError: $.ajax is not a function 오류 용량을 줄이려고 slim 빌드 jQuery 를 사용했었는데, slim 빌드를 사용하게되면, $.ajax() 를 사용할 수 없다. 구글에 검색해본 결과, stack overflow 에서 아..

memostack.tistory.com

 

반응형