Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I enable JS library auto completion in PhpStorm?

In an HTML file, I included jQuery via

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" ></script>

I downloaded the library via the context menu and now see it in the project folder under External Libraries. Yet, it seems jQuery is not recognized.

<script type="text/javascript">
    $(document).ready(function() {
    ..
    });
</script>

The $ is underlined and code hinting asks me to create a function or method called $. The code itself works though.

What am I supposed to do to make PhpStorm recognize the external JavaScript library?

like image 558
k0pernikus Avatar asked Jun 25 '12 08:06

k0pernikus


1 Answers

As LazyOne pointed out in his comment I had to look up settings, and there I realized I had to download the library again, and made it global.

phpstorm's settings

like image 186
k0pernikus Avatar answered Oct 21 '22 23:10

k0pernikus