Why getting “Uncaught ReferenceError: $ is not defined” error on Chrome Dev Console?
问题 I'm trying to run a simple JQuery script in Chrome Developer Console but I have a problem. There is no problem in this code when I run it on Chrome Developer Console: var someValue = $("[name='Jack']"); if(someValue !== null){ console.log("Jack is here!"); } But, I'm getting an error when try to run the same code inside a setTimeout function like below: setTimeout(function(){ var someValue = $("[name='Jack']"); if(someValue !== null){ console.log("Jack is here!"); } }, 1000); Uncaught