Search code examples
javascriptjqueryconfigurationautocompletephpstorm

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?


Solution

  • 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