Jquery code support not working.
Guys,
I installed webstorm, everything works fine except the jQuery code support(Auto complete).In my previous installations that feature worked great.But yesterday I had to re-install my OS, After I re-installed webstorm then I started facing this trouble.
When I mouse over on jquery terms webstorm cloud notice says -
Expression statement is not assignment or call less...(Ctrl+F1)
This inspection reports expression statements which are not assignments or calls. Such statements have no dubious semantics, are normally the result of programmer error.
Powered by InspectionJS
Unterminated statement
less...(Ctrl+F1)
This inspection reports JavaScript statements which are not terminated by a semicolon. While line-breaks may be used instead of semicolons to terminate JavaScript statements, some coding styles prefer the semicolon for consistency with the other languages.
Powered by InspectionJS
Please help me to solve this issue.
请先登录再写评论。
For code completion to work you need jQuery to be either under your project root or defined as global library (see Settings|JavaScript Libraries). Maybe you have lost these settings when you reinstalled the system.
Hmm... I was trying to do that, but to no avail...
For some reason when I add jquery library reference via File->Settings->JavaScript Libraries reference to jQuery 1.6.4
I'm still having "greyed out" $( for JQuery as well as val in $("#xyz").val(...)
Is that because of minified vs. full version of JQuery? I've added both .min and full version under Debug and Release. Also, I have only "Global" option in File->Settings->JavaScript Libraries. And then, I can't set anything in File->Settings->JavaScript Libraries->Usage Scope;
I have PHPStorm v3.0 build PS-111.19
OK, SOLVED,
It happens so, that in my case jquery-1.6.4.js MUST be located INSIDE of the project tree.
So, two conditions:
1) NOT minified (I used to have only jquery-1.6.4.min.js inside my project tree)
2) NOT referenced from the outside
The latter is systemic issue with PHPStorm. Same situation about autocompletion for PHP libraries - as long as they are OUTSIDE - they are not tagged.
----------------------------------
PHPSTROM ONLINE HELP MANUALS SO FAR ARE NOT VERY HELPFULE, dare me and show how they address this situation