Adding IntelliSense for JQuery in Visual Studio 2008
April 6, 2011 Leave a comment
To set up IntelliSense for JQuery you will need to download the JQuery Documentation File
from the JQuery site.
the documentation file:
/// <reference path="jquery-1.3.2-vsdoc2.js" />
If you downloaded jQuery and saved it to your project Visual Studio will look for the vsdoc.js file automatically if
the following conditions are met.
- You downloaded and installed the hotfix for Visual Studio.
- jQuery and the documentation file need to be named the same with the exception that the documentation file end with -vsdoc.js.
So when you add jQuery to your project make sure to rename them similarly. For instance, jquery-1.3.2.js is your jQuery library,
Visual Studio will look for the documentation file at jquery-1.3.2-vsdoc.js and load it.
(Note: the jQuery 1.3.2 documentation file is named jquery-1.3.2-vsdoc2.js on the Download page so make sure you take out
the 2 so that the file will be found by Visual Studio).
- To test to make sure the documentation file loaded correctly, you can type $( and you should be presented with some documentation.