Saturday, January 14, 2012

How to get intellisense for JQuery in Visual Studio

Visual Studio comes with JQuery out of the box, but it's always a good idea to go to JQuery.com to get the latest version. Currently we're at v1.7.1. There are the two versions there, one large and one small. The small (Production version) is around 31k and the large (developer version) is around 229k.

In addition to this, if we visit http://appendto.com/community/jquery-vsdoc we can download a version that provides the ///- type comments and intellisense for Visual studio.

  1. You download the file. 
  2. You save it to the folder that contains the JQuery file. 
  3. Save it with a JS extension. 
And away you go.


The header comments from the file:


/*
* This file has been generated to support Visual Studio IntelliSense.
* You should not use this file at runtime inside the browser--it is only
* intended to be used only for design-time IntelliSense.  Please use the
* standard jQuery library for all production use.
*
* Comment version: 1.7
*/

/*!
* jQuery JavaScript Library v1.7
* http://jquery.com/
*
* Distributed in whole under the terms of the MIT
*
* Copyright 2010, John Resig

No comments:

Post a Comment