0

I am editing a .jsp file, and I inserted a <script> html tag, specifying the path of the jquery.js file, then in the next <script> tag, I am trying to use JQuery methods, but it has not autocompletion.

enter image description here

How do I enable autocompletion for JavaScript in HTML/JSP files? I am currently using Web Tools Project, but I am willing to download any other addon if required.

1 Answer 1

2

I think you should have a look to this eclipse plugin https://github.com/angelozerr/angularjs-eclipse and most specifically this one https://github.com/angelozerr/tern.java

I use it for angularjs and JS autocompletion. You can add autocompletion on jQuery and other common libraries.

To install and use it, look https://github.com/angelozerr/tern.java/wiki.

Sign up to request clarification or add additional context in comments.

3 Comments

Could you please tell me, which specific packages do I have to install? And how do you enable JavaScript external libraries autocompletion? (atleast JQuery)?
Sorry I didn't notice your comment. You should install at least Tern Feature, Tern JSDT Feature, Tern Server node.js feature, Tern Tooling. You can also install WTP HTML - Web resources for a nice autocomplete on css class. Here is the getting started page github.com/angelozerr/tern.java/wiki/Getting-Started
Once you have installed tern.java, you can activate jQuery support with Tern Modules project properties. See github.com/angelozerr/tern.java/wiki/Tern-&-jQuery-support

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.