memostack
article thumbnail
블로그를 이전하였습니다. 2023년 11월부터 https://bluemiv.tistory.com/에서 블로그를 운영하려고 합니다. 앞으로 해당 블로그의 댓글은 읽지 못할 수 도 있으니 양해바랍니다.
반응형

Uncaught TypeError: $.ajax is not a function 오류

 

용량을 줄이려고 slim 빌드 jQuery를 사용했었는데, slim 빌드를 사용하게되면, $.ajax()를 사용할 수 없다.

<script src="https://code.jquery.com/jquery-3.5.1.slim.js"></script>

 

구글에 검색해본 결과, stack overflow 에서 아래 글을 찾았다.

출처: https://stackoverflow.com/questions/18271251/typeerror-ajax-is-not-a-function

 

그래서, 아래와 같이 slim을 뺀 빌드 버전으로하면 해결된다.

<script src="https://code.jquery.com/jquery-3.5.1.js"></script>

 

 

Reference

stackoverflow.com/questions/18271251/typeerror-ajax-is-not-a-function

 

TypeError: $.ajax(...) is not a function?

I'm trying to create a simple AJAX request which returns some data from a MySQL database. Here's my function below: function AJAXrequest(url, postedData, callback) { $.ajax() ({ type: ...

stackoverflow.com

 

반응형
블로그를 이전하였습니다. 2023년 11월부터 https://bluemiv.tistory.com/에서 블로그를 운영하려고 합니다. 앞으로 해당 블로그의 댓글은 읽지 못할 수 도 있으니 양해바랍니다.
profile

memostack

@bluemiv_mm

포스팅이 좋았다면 "좋아요❤️" 또는 "구독👍🏻" 해주세요!