IntelliSense for jQuery

As for reported here, we now have an official IntelliSense documentation file that will allow you to get rich intellisense for jQuery from inside of Visual Studio.

When you go to download jQuery, you will see a Documentation link.  Or you can download it directly from here:
https://code.jquery.com/jquery-1.2.6-vsdoc.js

Using this file is simple, if you are inside an ASPX page, you can reference it like this:

 <script src="jquery-1.2.6.js" type="text/javascript"></script>
<% if (false) { %>     <script src="jquery-1.2.6-vsdoc.js" type="text/javascript"></script>
<% } %>

The if (false) part will make sure we don’t render or execute this as a script but it will get loaded by IntelliSense.

If you are inside a javascript file, you can reference it in the normal way like:

 /// <reference path="jquery-1.2.6-vsdoc.js" />

This also supports plug-ins.  So you will get IntelliSense on the as well.  Hope that those of you using jQuery can put this file to good use.

Comments

  • Anonymous
    October 30, 2008
    PingBack from http://mstechnews.info/2008/10/intellisense-for-jquery/

  • Anonymous
    October 30, 2008
    Has anyone done this for Prototype? Is there a centralized site for intellisense files like this?

  • Anonymous
    October 30, 2008
    Nice tip Tom. I was wondering what was going to be the best way to have the intellisense in the designer but not on the 'live' page.

  • Anonymous
    November 16, 2008
    Hello, even I need a way to get similar functionality on prototype.... I guess no solution till date :(