Tuesday 11 November 2014

Today I'll share my experience on how to add jquery plugin to your eclipse.

I would pick below tools - 

1. Eclipse Kepler 4.3
2. jquery 2.1

Steps to install the jqery plugin with eclipse are below - 

1. Go to Eclipse Help -> Eclipse Market Place -> Search.
2. In text field, search JSDT  jquery.
3. Once it searched the result, click on install and complete the installation.
4. Restart your eclipse.

But it WON'T give you autocomplete for your jquery. For that, read the below topic -

Now you have the plugin for jquery, but you have to make your project enabled for specific jquery version, for which you need auto-completion. Steps to enable jquery autocomplete option are given here -

1.  Say you explore you project through package explorer. Right click on your project.
2. Go to Configure -> Convert to java script project. And then refresh your project.

Now you make your project enabled for javascript, further for adding jquery support follow below steps -

3.  Select your project, right click on it and go to properties (Or Alt+Enter after selecting your  
     project).
4. Expand Java Script -> Include Path
5. Click on Add JavaScript Library
5. When pop up appear, select jqery library
6. Select your version say 2.1, and DON'T select No Conflict. Leave the checkbox unchecked.(If you 
    select, you might not get auto complete).
7. Click on finish.

Your project should be enabled with jquery auto-complete, create any .js file and start enjoying the feature.



Happy Learning...

:-)