TypeError: 'undefined' is not a function (evaluating '$(document)')

Posted by RAY.D
2015. 4. 13. 23:29 Web/javascript / jQuery
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.







TypeError: 'undefined' is not a function (evaluating '$(document)')

 

 

 

use

 

jQuery(document);

 

instead of

 

$(document);

 

You can easily wrap this up in a self executing function so that $ refers to jQuery again (and avoids polluting the global namespace as well), e.g.

(function ($) {
   $(document);
}(jQuery));