How to Get Jquery Code Completion in Netbeans

How can I get jQuery code completion in NetBeans?

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.

How can I get jQuery code completion in NetBeans?

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.

jQuery Code Completion in Netbeans for *.js Files

Problem solved.

  1. Downloading the developer version of jquery
  2. Include the jquery file in js/jquery-Version.js
  3. Adjust the BrowserSupportSettings in Options->Misc

Netbeans JQuery Selector auto-complete

Naor answer made me rethink what I was doing, but it didn't quite answer my question. So let me provide the solution I found in case anyone is interested.

When working with netbeans, the auto-complete function behaves differently between php files and html. In html jquery selectors auto-completes as expected. But when trying to do the same within a php file in an html section of code, it will fail to auto-complete.

Just make sure that if you are expecting this feature to work, that you are using html files, not php. I will submit this as a feature/bug to the netbeans guys, hopefully they can fix it and make html/js auto-completion available to all file types that can include html/js code.

JQuery-Mobile code assist (code (auto) completion, code hinting) for Netbeans IDE

I figured we could drop the un-answered rate a bit here:

If the application (Netbeans) is going to parse a script to get function names then you should give it a file with function names rather than the minified/obfuscated version.



Related Topics



Leave a reply



Submit