[jQuery] jQuery intellisense in VS2008 (including chaining)
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
{page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal>Once you install the latest hotfix (<a
href="http://weblogs.asp.net/scottgu/archive/2008/02/08/vs-2008-web-development-hot-fix-roll-up-available.aspx">http://weblogs.asp.net/scottgu/archive/2008/02/08/vs-2008-web-development-hot-fix-roll-up-available.aspx</a>)
VS 2008 supports jQuery javascript intelliense.<o:p></o:p>
<p class=MsoNormal><o:p> </o:p>
<p class=MsoNormal>At first, intellisense doesn’t work on chained methods,
but James Hart figured out a way to solve that:<o:p></o:p>
<p class=MsoNormal><o:p> </o:p>
<p class=MsoNormal><a
href="http://blogs.ipona.com/james/archive/2008/02/15/JQuery-IntelliSense-in-Visual-Studio-2008.aspx">http://blogs.ipona.com/james/archive/2008/02/15/JQuery-IntelliSense-in-Visual-Studio-2008.aspx</a><o:p></o:p>
<p class=MsoNormal><o:p> </o:p>
<p class=MsoNormal>He wrote an automated script that extracts the jQuery XML documentation
into a js file, which is used by VS in the intellisense, showing methods, parameters,
etc.<o:p></o:p>
<p class=MsoNormal><o:p> </o:p>
<p class=MsoNormal>Unfortunately, the XML documentation he had was pretty old
(1.1.2)<o:p></o:p>
<p class=MsoNormal><o:p> </o:p>
<p class=MsoNormal>I used the excellent python script by David Serduke (<a
href="http://www.exfer.net/jquery/createjQueryXMLDocs.py">http://www.exfer.net/jquery/createjQueryXMLDocs.py</a>)
to extract the latest documentation straight out of the jQuery wiki and export it
as XML, then updated James’ script to work with the new XML schema and
re-generated the file.<o:p></o:p>
<p class=MsoNormal><o:p> </o:p>
<p class=MsoNormal>This page here generates the new documentation script, you
can just copy and paste it out of the textarea into a .js file.<o:p></o:p>
<p class=MsoNormal><o:p> </o:p>
<p class=MsoNormal><a href="http://cobalt.scorpiontechnology.com/jsi/">http://cobalt.scorpiontechnology.com/jsi/</a><o:p></o:p>
<p class=MsoNormal><o:p> </o:p>
<p class=MsoNormal>If you follow James’ blog entry (the first link), it
explains how to use it. I’ve found this invaluable, as it not only
gives the signatures of each function, it also gives parameters and
documentation information that has been filled out on the Wiki by the jQuery
team. And it does work with chained methods.<o:p></o:p>
<p class=MsoNormal><o:p> </o:p>
<p class=MsoNormal>If this is of value, I should be able to keep this updated (as
the Wiki is updated); especially as it is simply a matter of running two
automated scripts.<o:p></o:p>
<p class=MsoNormal><o:p> </o:p>
<p class=MsoNormal>Cheers,<o:p></o:p>
<p class=MsoNormal>JK<o:p></o:p>
</div>
</body>
</html>