최상단

컨텐츠

[jquery] ajaxStart 이벤트가 발생하지 않을 때?..

글 정보

Category
컴퓨터 이야기
2013. 5. 22. 12:01

본문

jQuery를 사용하여 ajax 요청을 보내고 ajaxStart와 ajaxComplete 이벤트를 받아 로딩 중임을 처리하는 간단한 샘플을 작성하려고 하는데, 

뭐가 문제인지 계속 되지 않았다.

분명히 인터넷에 돌아다니는 예제와 다를게 없는데.....

계속 삽질..............

을 하던 중...

jQuery 문서 페이지를 봤더니,.


As of jQuery 1.8, the .ajaxStart() method should only be attached to document.


이런 이야기가 ...

쿨럭..

결국 .ajaxStart는 jQuery 1.8 이상에서는 document 오브젝트에 붙여서 사용해야 한다.

삽질. 끝..ㅡㅡ;;


그리고, 

  • If $.ajax() or $.ajaxSetup() is called with the global option set to false, the .ajaxStart() method will not fire.

이런 이야기도 있으므로, 사용시 참고해야 할 것 같다.-..




트랙백과 댓글 여닫기

TOP