Tales from the Evil Empire

Bertrand Le Roy's blog

News

Ads Via DevMavens

ASP.NET AJAX UpdatePanel Control: Add Ajax interactivity to your ASP.NET 2.0 web pages


follow bleroy at http://twitter.com

Bertrand Le Roy




Add to Technorati Favorites

Blogs I read

My other stuff

jQuery IntelliSense documentation file available

IntelliSense documentation files for jQuery just got published on jquery.com. This enables great IntelliSense at design-time for jQuery in Visual Studio 2008. It goes without saying that this file should only be used at design-time and never at runtime. For the moment, in order to ensure that, you can include the file from an “if (false)” server code block. We’re also working on a much better solution.

Many, many thanks to John Resig, Scott Cate and Jeff King for making that possible.

1.2.6:
http://code.jquery.com/jquery-1.2.6-vsdoc.js
Latest release (currently just a copy of 1.2.6):
http://code.jquery.com/jquery-latest-vsdoc.js

UPDATE: Jeff King wrote a great post explaining how to use the IntelliSense file now and once Visual Studio has been patched (patch will sonn be released).
http://blogs.msdn.com/webdevtools/archive/2008/10/28/rich-intellisense-for-jquery.aspx

Comments

Dave Ward said:

Awesome!

Is there any difference between including it in a script block and including it as a reference like this?

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

# October 27, 2008 1:01 PM

Bertrand Le Roy said:

@Dave: good point, Dave, but references I believe currently only work in JS files, not in pages. But from JS files, that is clearly the best strategy for now. Eventually, you'll be able to just reference the main jquery file.

# October 27, 2008 1:10 PM

John M. Anderson said:

Script block can use the minified compressed version to save bandwidth, so you just want to use the vsdoc as a reference for intellisense... The comments take up to much space to be used in production.

# October 27, 2008 1:41 PM

Regis said:

Can't wait to try that one, could never get it to work flawlessly with the previous 'hacks' :)

# October 27, 2008 4:02 PM

Bertrand Le Roy said:

@John: precisely. That's why I've been insisting in the post that this should never be used at runtime. We are going to enforce that in the future by allowing you to only reference the runtime and the IDE should be able to find the IntelliSense file automatically.

# October 27, 2008 7:19 PM

chanva said:

That's a great news.

# October 27, 2008 8:59 PM

Guy Harwood said:

Some instructions on how to get it working would be nice. ;-)

Previous info is scattered around with varying techniques that never seemed to work.....

# October 28, 2008 9:21 AM

Josh M. said:

I can't get intellisense to work for these files no matter how I include it (script reference or script inclusion).  In truth, I haven't been able to get js intellisense to work for my own javascript at all unless it's in a script block directly in the file.  I'm using vs2008 sp1 targeting the 2.0 framework.

# October 28, 2008 10:54 AM

Guy Harwood said:

Someone has bothered to do a full post...

blogs.msdn.com/.../rich-intellisense-for-jquery.aspx

# October 29, 2008 4:21 AM
Leave a Comment

(required) 

(required) 

(optional)

(required)