Scott Guthrie posted a helpful article on “jQuery Intellisense in VS 2008“.
I woulda been up and running with the jQuery intellisense in minutes if it hadn’t been for the fact that I overlooked his warning at:
Save the jquery-vsdoc.js file next to your jquery.js file in your project (and make sure its naming prefix matches the jquery file name)
In my particular case, my jQuery file was named jquery-1.5.1.min.js and the name for my associated Visual Studio jQuery Intellisense documentation file was named jquery-1.5.1-vsdoc.js.
Since the prefix of the two files didn’t match, the jQuery Intellisense didn’t work for me. To fix the problem, I renamed the jquery-1.5.1.min.js file to jquery-1.5.1.js. After I made the name change, Intellisense was working.
The syntax rules for the naming of the jQuery files are:
- You can create any name you wish for the actual jQuery file. For example: “foobar.js“
- The name of the Visual Studio jQuery Intellisense file must have the same name as the jQuery file with a suffix of “-vsdoc.js”. For example: If the name of the jQuery file is “foobar.js“, the jQuery Intellisense file must be named “foobar-vsdoc.js“