10
votes

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?

1
Works fine here (in the document where script was defined). Please check "Settings | JavaScript | Libraries" -- you may need to add that library to a bigger scope (by default that library will be allowed for that file only) -- use "Manage Scopes" for that - LazyOne

1 Answers

10
votes

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