A while back we updated VS2008 IntelliSense to not fail when referencing jQuery. However, getting IntelliSense for chained calls and rich summary/parameter hints still required adding special comments to a few thousand lines of jQuery. If you didn't have the time, you could download such a file from friendly members of the community such as James and Brennan.
As part of our new partnership with jQuery, yesterday we announced the availability of the official IntelliSense documentation file. As you can see, our friends at jQuery have added a new download link for Visual Studio athttp://docs.jquery.com/Downloading_jQuery#Download_jQuery.
You can also download the file directly from http://code.jquery.com/jquery-1.2.6-vsdoc.js. As you might guess, this documentation file corresponds with the latest version of jQuery (which is currently 1.2.6). While this file has a "js" extension, it's really just a documentation file. You do not want to run this file in the browser.
How do I use this file (today)?
If you're inside an ASPX page, you will need to add the following lines of code into (normally) the head of your page:
Why do we have a server-side conditional statement? IntelliSense disregards conditional statements of this type, and thus loads the "vsdoc" file (overriding the normal one). At runtime the if (false) statement will ensure it this documentation file is not rendered (and executed) as script. This trick allows the "switching" behavior you want.
If you're in a JavaScript file, use the normal file reference syntax to refer to the "vsdoc" file.
There's no need for tricks here since this comment is only meaningful to IntelliSense.
How do I use this file (in the near future)?
The ideal user experience should be one where you do not need special tricks as mentioned above. Really, you shouldn't need to mention the "vsdoc" file name at all. To that end, we plan on releasing a Hotfix that will enable this (stay tuned!). Given normal references such as...
...IntelliSense will opportunistically search for "jquery-1.2.6-vsdoc.js" and load that file instead. Generally, given script name "x", IntelliSense will opportunistically search for "x-vsdoc.js". If not found, it will then search for "x.debug.js". You just need to make sure to place your "vsdoc" file next to the normal file. Note, if you use jquery-1.2.6.min.js, you may need to rename the file to match the search pattern.
What are the advantages of this file?
One unique benefit of the file we have released is that it supports and understands jQuery plug-ins. For example, given the plug-in below...
...you would see "myplugin" show up in IntelliSense.
We've noticed a few plug-ins do not work, and commonly this is because there is an IntelliSense incompatibility issue with the plug-in itself (as opposed to the jQuery documentation file).
![]() |
Austin Liu 刘恒辉
Project Manager and Software Designer E-Mail:lzhdim@163.com Blog:https://lzhdim.cnblogs.com 欢迎收藏和转载此博客中的博文,但是请注明出处,给笔者一个与大家交流的空间。谢谢大家。 |
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
· 【自荐】一款简洁、开源的在线白板工具 Drawnix