It was announced today at the Microsoft Professional Developers Conference that Visual Studio 2008 supports Intellisense for jQuery with an additional file available from jQuery. The file is available from Google Code.
There are no instructions included with the download but I took the time to get jQuery Intellisense to work in one of my ASP.NET MVC projects. In order to get this to work I did the following:
1. Downloaded the jquery-1.2.6-vsdoc.js to the Scripts folder of my project along side my jquery-1.2.6.js file.
2. In my project I referenced the jquery-1.2.6-vsdoc.js file in my Master Page so I could reference it anywhere, like so:
3. Once this is in place a simple test of function was created and Intellisense was tested:
The reference to jQuery can be clearly seen here.
The list of methods available as part of the jQuery library can also be seen.
This was pretty easy, the key part is making sure you have the proper path set for Visual Studio to find the jQuery JavaScript files. I used the path as ?~/script/jquery-1.2.6-vsdoc.js? and placed it after the reference to the main jQuery JavaScript file, referenced the same way.
I hope this helps someone else trying to get this going.