Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why IntelliJ Idea doesn't recognize the dollar operator of JQuery?

IntelliJ shows a warning "Unresolved function or method $()" when mouse over the $ sign despite the file is in the same directory as js file. So I can't take advantage of intellisense when typing $ functions.

Just one line of code and the IDE didn't recognize it. But it works. How can I fix this problem?

$(".container").get(0).appendChild(proDiv); 
like image 942
Ali Tor Avatar asked May 04 '16 22:05

Ali Tor


People also ask

Does IntelliJ support jQuery?

Intellij idea does not autocomplete jQuery and bootstrap – IDEs Support (IntelliJ Platform) | JetBrains. Please consider editing your post and mark it as obsolete instead.

How do I fix my IntelliJ idea?

From the main menu, select File | Repair IDE. IntelliJ IDEA will automatically launch the first recovery step and refresh the virtual file system. IntelliJ IDEA will display a notification that you can use to continue or complete the recovery process.


1 Answers

I have found the solution by myself.

  1. First press CTRL + ALT + S and go to settings.
  2. Then click from the menu Languages & Frameworks
  3. Select JavaScript from the section below and select Libraries
  4. In the open menu on the right, click on the Download button and select jquery from the list.
  5. Download it and apply. It is done.

downloading a library with IntelliJ

like image 93
Ali Tor Avatar answered Sep 19 '22 07:09

Ali Tor