javascript - ReferenceError: $ is not defined although jQuery was added in Layout.jade -
i getting error when trying run basic javascript code in node.js
referenceerror: $ not defined @ object.<anonymous> (/home/ubuntu/workspace/nodetest2/public/javascripts/global.js:5:1) @ module._compile (module.js:409:26) @ object.module._extensions..js (module.js:416:10) @ module.load (module.js:343:32) @ function.module._load (module.js:300:12) @ module.runmain [as _ontimeout] (module.js:441:10) @ timer.listontimeout (timers.js:92:15)
in layout.jade have added
script(src='http://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js') script(src='/public/javascripts/global.js')
thank help.
Comments
Post a Comment