How can I get jQuery code completion in NetBeans?

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.

amending that: VSdocs actually work: http://code.jquery.com/jquery-1.4.1-vsdoc.js or http://www.asp.net/ajaxlibrary/cdn.ashx for version after 1.4.1


First go to Tools -> Options -> Miscellaneous and click on the Javascript tab, 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.


For Netbeans 6.7 / 6.8 / 6.9, just follow the guide here:

Using jQuery to Enhance the Appearance and Usability of a Web Page

There's a section about half way down called "NetBeans Code Completion and API Support".

Worked no problem for me.

Note: "Choose the uncompressed version, i.e., 'Development', before downloading the jQuery library. Using the uncompressed version will allow you to examine the JavaScript code in the editor, and aid in any debugging processes."

Tip: Tools / Options / Miscellaneous / JavaScript. In the "Targeted Browsers" section, ensure IE is "6 or later". Otherwise, you'll get "Not supported" errors in the code completion pop-up and a lot of the commands will be struck out.