JavaScript runtime error: '$' is undefined

前端 未结 6 1338
后悔当初
后悔当初 2020-12-16 18:22

So classic problem, but having a horrible time on finding the actual cause. Typically when I see this error it\'s because the jQuery reference is after code requiring it, or

6条回答
  •  醉话见心
    2020-12-16 18:42

    I was getting this same error code:

    (Error: 'generateText' is undefined)

    ...on the code

    var bodyText=["The....now."]

    I discovered on my text-editor(Notepad++), when typing many lines of text in the directly above the variable bodyText, if I didn't hit return carriage (enter==>WordWrap is off) just kept typing w/o return carriage and let the editor adjust text it worked?

    Must be in the settings of Notepad++??

提交回复
热议问题