ISSUE :
 
Profile photo
Submitted by Martin Fowler
on July 28th, 2011 at 16:25:50 EST

How can I use jQuery in Eclipse

Hi,
I am planning to work on some UI tasks that we have selected jQuery to do it.
How can I use jQuery in eclispe?
Thanks,
Martin


Profile photo
Replied by SBajra
on July 28th, 2011 at 17:17:29 EST
I am not expert in Eclipse but I think JQuery is client side Javascript library. So, it should not be independent in any IDE like Eclipse or Visual studio. Just reference the JQuery library and then start using the library.
For more information visit JQuery documentation:
http://docs.jquery.com/Main_Page
Accepted Answer
Accepted
 Answer

Profile photo
Replied by Martin Fowler
on July 28th, 2011 at 18:30:41 EST
Thanks for the response.That's true I was searching for some plugin but just to import the library and use it and later change when we get updated version will be better idea.

Profile photo
Replied by Hige Gojira
on August 11th, 2011 at 12:00:23 EST
There's no PDT package for latest Eclipse 3.7 Indigo and downloading it whole through Eclipse "Install New Software" can be very frustrating with sd unstable connection as mine,
I've prepared clean install for Windows 64-bit suitable for PHP/JavaScript/jQuery development including the following:

Eclipse 3.7 WebJS Win 64-bit
PDT 3.0
Eclipse Color Theme 0.11.1
JSDT jQuery - lightweight plugin to add jQuery support (tiny alternative to heavy plugins Aptana and jQueryWTP)

To enable jQuery code assist (auto completition) right click "JavaScript Resources" in your project (for PHP project you had to enable JavaScript support) and in "Libraries" tab click "Add JavaScript Library". jQuery library should appear among choices. Choose it, confirm everything and you're done. :)

Download:

http://www.fileserve.com/file/MCpZjdv

OR

http://www.filesonic.com/file/1559490341

Profile photo
Replied by Martin Fowler
on August 11th, 2011 at 15:17:00 EST
@Hige thanks for your response and direction.Appreciate it.
As as work around I have done this.

Help->Install new software->All Available Sites->Web, XML, Java EE and OSGi Enterprise Development

I do have java script editor after doing this steps.
I can do

File->New->JavaScript->Java Script Source file to bring new js file with javascript editor capability

Please note that I am using Eclipse 3.7 @64 bit.Let's share each other idea.Life is learning and sharing knowledge everyday.Please let me know if you don't follow any of these steps I can build a article with screen shots like they have it here:
http://codeissue.com/articles/a04e2f56b905cd0/eclipse-remote-system-explorer-user-guide
Thanks,
Martin

Profile photo
Replied by Martin Fowler
on August 11th, 2011 at 15:26:41 EST
I did that for java script editor. I will try yours for jQuery editor and get back to you in case I have any issues.
Thanks again.
Martin

Profile photo
Replied by Cara Reed
on August 11th, 2011 at 15:30:38 EST
That works great thanks @Hige.
Cara

Profile photo
Replied by Amira Rashed
on December 10th, 2012 at 11:10:47 EST
Hello
I want to use eclipse in developing phonegap and JQuery application so i create a phonegap project using phonegap wizard and i included JQuery built in library ver. 1.1 AND when i reapet the process for the phonegap project with JQuery mobile ver. 1.2 i got the same error : the library is already defined .
Can you please help with that error ?
Thanks

Profile photo
Replied by Martin Fowler
on December 10th, 2012 at 13:04:47 EST
Can you please put some debug stmt to make sure if it goes in these if else
if(!!window.jQuery) {
// jQuery is loaded
} else {
// load jQuery first
}

//For eg:
if(!window.jQuery) {
var script = document.createElement('script');
script.src = 'http://mysite.com/js/jquery-1.7.1.min.js';;
script.type = 'text/javascript';
document.getElementsByTagName('body')[0].appendChild(script);
}

Profile photo
Replied by Zed Ulisse
on May 22nd, 2013 at 06:14:55 EST
Here comes a question.

If it's linked to project explorer, How to use in Remote System Explorer?
I don't use projects. Everything is working fine, html, perl, javascript, but i cannot get this plugin jquery to work.

Any Solution?

thanks

Profile photo
Replied by Yogaraj Khanal
on May 23rd, 2013 at 06:50:08 EST
Search for JSDT jQuery from eclipse market place after doing update in eclipse.
Then you select that plugin and install. It's very easy process.I just did recently and works fine like jQuery auto completion and other stuff like Java for suggestions on available events and selectors.

Profile photo
Replied by Yogaraj Khanal
on May 23rd, 2013 at 06:53:36 EST

Profile photo
Replied by Stas Ustimenko
on November 11th, 2013 at 13:20:30 EST
I suggest to try Codelobster PHP Edition - http://www.codelobster.com
It has great support for JQuery and many PHP frameworks.