Add IntelliSense for custom jQuery libraries

When you have worked with Visual Studio, you know the power of IntelliSense which helps you speed up coding. It works well with VB/C# languages, but it can also be useful for writing JavaScript / jQuery.

When writing JavaScript only basic suggestions are shown:

intellisense_without_good_suggestions

As you can see, only ajax.js, dhtml.js and ecma.js are mentioned. I have my own lib scene.dataservice.js in the VS project, but that doesn’t show up here. There is a simple trick to make this work. Just add <reference path=”<your_favourite_script>.js” /> as a comment, and see the magic:

intellisense_with_good_suggestions

Hope this helps,