Hi there,
Today at work, I found out something weird about the JQuery intellisense feature in Visual Studio 2008.
For 99% of the developers out there you won't have a problem, but for the 1% of plugin developers, you have! But he! There's at least a workaround!
So first: To enable intellisense completion for jQuery within VS you'll want to follow three steps (According to Scott Guthrie and Guy Burnstein) and my other step, to setup your project:
Step 1: Install VS 2008 SP1
VS 2008 SP1 adds richer JavaScript intellisense support to Visual Studio, and adds code completion support for a broad range of JavaScript libraries.
Step 2: Install VS 2008 Patch KB958502 to Support "-vsdoc.js" Intellisense Files
Last year Microsoft shipped a patch that you can apply to VS 2008 SP1 and VWD 2008 Express SP1 that causes Visual Studio to check for the presence of an optional "-vsdoc.js" file when a JavaScript library is referenced, and if present to use this to drive the JavaScript intellisense engine.
These annotated "-vsdoc.js" files can include XML comments that provide help documentation for JavaScript methods, as well as additional code intellisense hints for dynamic JavaScript signatures that cannot automatically be inferred. You can download it for free here.
Step 3: Download the jQuery-vsdoc.js file
You can download both jQuery and the jQuery-vsdoc file from the official download page on the jQuery.com site:
Download the uncompressed file and the Visual Studio documentation file, which are hosted by Google.
http://code.google.com/p/jqueryjs/downloads/detail?name=jquery-1.3.2.js
http://code.google.com/p/jqueryjs/downloads/detail?name=jquery-1.3.2-vsdoc2.js
Step 4: Visual Studio .NET 2008
- Create a new website in Visual Studio .NET 2008, create a Scripts directory and add the two files to that directory
- Rename the jquery-1.3.2-vsdoc2.js file to jquery-1.3.2-vsdoc.js (Remove the 2)

- Then create a test.js file, and open it.
- Reference the uncompressed jquery file, by dragging it in the test.js file from your solution explorer.
- You'll notice that you have Intellisense. Great!
Even after typing the selector, we'll keep intellisense!

- You'll notice that you still have Intellisense. Great!
But let's type further.....

....
- We have NO intellisense....I guess the 'Closure' screws things up big time
.
- So follow the following when writing JQuery Plugin code
- Make sure you uncomment both those lines when checking in your code or deploy your JQuery Plugin code.
We'll that's it!
Hope this is usefull!
gr,
Robbert