I added jQuery to my web project in Webstorm and sure enough I see the jQuery2-0 under external libraries, but where do I add a reference to it?
I tried using code completing in the html file for my script tags, but where is it stored? In which directory?
So in the src of these script tags where do I point it?
<script src=""></script>
Webstorm seems to have downloaded the script but I am confused about how to link to it in my html file.
When you download a library using Download... button in Settings/JavaScript/Libraries, it's not placed in your project directory - it's saved to idea.system.path/extLibs folder (see https://intellij-support.jetbrains.com/entries/23358108 for information about IDE configuration/caches location; normally the idea.system.path is ~/.<PRODUCT><VERSION>/system
on Windows/Linux and ~/Library/Caches/<PRODUCT><VERSION>
on Mac).
You can copy the file (normally smth like 'http_code.jquery.com_jquery-2.0.0.js ') to your project directory and then use completion within 'src' attribute in your HTML to create a link to it, or (even better) use CDN references instead - like <script src="http://code.jquery.com/jquery-2.1.1.js"></script>
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With