34

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);
Ali Tor
  • 2,772
  • 2
  • 27
  • 58
  • 1
    @Mifeet I don't think this is a duplicate of that question, since the question you referred was about a bug in the IDE that was already fixed a year ago. – Derek 朕會功夫 May 04 '16 at 22:18

2 Answers2

87

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

daaawx
  • 3,273
  • 2
  • 17
  • 16
Ali Tor
  • 2,772
  • 2
  • 27
  • 58
  • 7
    If you require a specific version of jQuery: Download the js file and store it somewhere meaningful. Then click `Add...` instead of the fourth step, specify name and framework type, and attach the js file. – Leukipp Aug 24 '16 at 03:24
  • 1
    You may need to restart the application. – Will Jun 14 '22 at 15:23
0

a solution is just to type npm install jquery in ur Rider Terminal and it will get installed by itself. I hope this was usefull.

kind regards

Alonell
  • 1
  • 1
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Feb 02 '23 at 08:31