'uncaughttypeerror'에 해당되는 글 1건

  1. 2020.11.04 Uncaught TypeError: $(...).size is not a function
JQuery2020. 11. 4. 13:44

일단 not a function 에러가 나는 이유는 거의 2가지인데..

첫번째는 jquery가 중복으로 include 되어 중복을 제거해주면 없어지는 경우이고..

두번째는 정말 삭제된 function인 경우.




Uncaught TypeError: $(...).size is not a function

해당 size() function은 JQuery에서 이제 삭제된 function이라고 한다.

3.0에서 없어졌다고..

 


size() 대신 -> length를 써주면 된다.



---- 다른 블로그에서 확인한 답변
Check your version of jQuery. I was using the latest(3.1.1) some plugins i use were throwing this error.
according to the docs: The .size() method is deprecated as of jQuery 1.8. Use the .length property instead.
( it was removed in 3.0 )
so a simple rollback to a version before 3.0 did the trick.
edit: whoops, as A. Wolff says in the comments.

출처 : http://glqdlt.tistory.com/m/381?category=609907

'JQuery' 카테고리의 다른 글

[jquery] ajax사용시 error 확인  (0) 2020.11.05
JQuery checkbox 제어  (0) 2020.11.05
JQuery 기본 이벤트(each, click, attr ...)  (0) 2020.11.04
live, on의 차이!!!  (0) 2020.11.04
JQuery Select box 제어  (0) 2020.11.04
Posted by 사슴영혼'-'