Javascript How-ToAsk your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
Visual Studio 2010 has very nice jQuery intellisense support, but I have to add a hint at the top of my javascript file - a reference path to the vsdoc file.
Is this how it supposed to be? I am using Visual Studio 2010 beta 2 and JQuery 1.4.2. By the way, does anybody know whether there is a vsdoc for 1.4.2? I am using 1.3 vsdoc.
Version 1.4.2 of the jQuery library was recently released and it takes some time before the VS doc file becomes available. You can find the 1.4.1 version here: http://www.asp.net/ajaxlibrary/cdn.ashx
Most of the times, VS will figure out the doc file based on the script files you're referencing. In a JavaScript file it makes sense. VS doesn't know where this file is going to be used, and thus doesn't know what other script files are available. Adding an XML doc reference fixes the problem and brings the documentation in the referenced file in scope.
You may want to up upgrade from beta 2 to the RC version.
From VS design point of view... If I use jquery for javascript, likely I will use it consistently. So a better way is to have a VS setting that lets me specify jquery vsdoc as the default for all javascript files, instead of having to comment each file.