I’m using NetBeans for PHP.
How can I get it to also give me jQuery code completion?
make sure the targeted browsers are configured properly, code completion changes by the minimal version of the targeted browsers to make sure that the functionality is supported.
You also need to add the jquery js file to your project so netbeans would be able to parse it and to properly add code completion.
i suspect using a non-minified version of jquery would help.
These answers are misleading because jQuery no longer self-documents using “scriptdoc.” Version 1.1.4 was the last to have this. Anything newer than that (>=1.2 ~mid-2007) is gutted.
For Netbeans 6.7 / 6.8 / 6.9, just follow the guide here:
There’s a section about half way down called “NetBeans Code Completion and API Support”.
Worked no problem for me.
I use netbians 7.x for development on drupal 6.x. Autocomplete works after adding non-minified version jquery-1.2.6.js file to the root folder of the project (so it will be with any version).
It is important to specify the version of the file name, without -1.2.6 will not work!
The basic rule is that your jQuery (or for that matter any js lib) should be found in the same project you need auto complete to work. So just place jquery-1.x.y.js somewhere in your project (that can be reached by NetBeans as it reaches your js file) and you should be good to go.
To test you can put the jQuery file in the same folder as your js file being edited.
Make sure your Internet connection is working, because NetBeans downloads documentation when is needed. I think that NetBeans downloads it from there, but this is only my assumption. This is parsing friendly XML document with whole and recent jQuery documentation.