Rich IntelliSense for jQuery
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).
Rich IntelliSense for jQuery的更多相关文章
- 10 个免费的 jQuery 可视化编辑器插件
富文本编辑器,也就是所见即所得的 HTML 编辑器,是网站一个非常重要的组件,特别是对于一些内容发布网站来说.本文介绍 10 个基于 jQuery 的可视化文本编辑器. MarkitUp markIt ...
- 基于jQuery 常用WEB控件收集
Horizontal accordion: jQuery 基于jQuery开发,非常简单的水平方向折叠控件. Horizontal accordion: jQuery jQuery-Horizonta ...
- 10个免费的javascript富文本编辑器(jQuery and non-jQuery)
祝愿园子里的朋友圣诞节快乐. 本文介绍了10个免费易用富文本编辑器(rich text editors,RTE),其中5个是Jquery插件,另外5个是非Jquery富文本编辑器 简介 Javascr ...
- (转)15个非常棒的jQuery无限滚动插件【瀑布流效果】
原文地址:http://www.cnblogs.com/lyw0301/archive/2013/06/19/3145084.html 现在,最热门的网站分页趋势之一是jQuery的无限滚动(也即瀑布 ...
- 15个非常棒的jQuery无限滚动插件【瀑布流效果】
现在,最热门的网站分页趋势之一是jQuery的无限滚动(也即瀑布流).如果你碰巧观察Pinterest的网站,如Facebook,Twitter和deviantART的,你会发现无限滚动的动作,当旧的 ...
- [asp.net core] Tag Helpers 简介(转)
原文地址 https://docs.microsoft.com/en-us/aspnet/core/mvc/views/tag-helpers/intro What are Tag Helpers? ...
- crossplatform---Node.js Applications with VS Code
Node.js is a platform for building fast and scalable server applications using JavaScript. Node.js i ...
- [Tips] Useful link ... on going
1. CSS Bootstrap http://getbootstrap.com/ Bootstrap 中文文档 http://getbootstrap.com/2.3.2/ 最全的 Twitter ...
- 来自后端的突袭? --浅尝最新开源的C# Web引擎 Blazor
在今年年初, 恰逢新春佳节临近的时候. 微软给全球的C#开发者们, 着实的送上了一分惊喜. 微软正式开源Blazor ,将.NET带回到浏览器. 这个小惊喜, 迅速的在dotnet开发者中间传开了. ...
随机推荐
- POJ 2329 (暴力+搜索bfs)
Nearest number - 2 Time Limit: 5000MS Memory Limit: 65536K Total Submissions: 3943 Accepted: 1210 De ...
- linux下各种文件格式的压缩以及解压缩命令
From : http://blog.csdn.net/mu0206mu/article/details/17732857 -------------------------------------- ...
- 软测试综述——PV操作
在操作系统中,进程之间常常会存在相互排斥(都须要共享独占性资源时)和同步(完毕异步的两个进程的协作)两种关系.而信号量和PV操作完美有效的处理了这两种情况. 相互排斥:就好比过独木桥,一 ...
- folat i = 0.1; 警告
今天的用途 float i = 0.1;那么编译器警告实际: #include <iostream> using namespace std; int main() { float k ...
- 写自己的第二级处理器(3)——Verilog HDL行为语句
我们会继续上传新书<自己动手写处理器>(未公布),今天是第七章,我每星期试试4 2.6 Verilog HDL行为语句 2.6.1 过程语句 Verilog定义的模块一般包含有过程语句,过 ...
- Error creating bean with name 'com.you.user.dao.StudentDaoTest': Injection of autowired dependencies
1.错误叙述性说明 七月 13, 2014 6:37:41 下午 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadB ...
- 《Javascript权威指南》十六学习笔记:BOM资源---BOM基本应用
BOM基本应用包括:管理浏览器历史记录.得到处理和解决浏览器的信息.本文介绍了这些应用程序. 一.浏览历史管理 1.history对象的方法和属性 History 对象包括用户(在浏览器窗体中)訪问过 ...
- Android一些解决方案内存问题(一)
通常我们遇到内存问题时,,解决方案一般有以下的例子: 1.做一些处理上的内存引用,经常使用软引用.加强引用.弱引用: 2.加载在内存中的照片时,它可以处理直接在内存,例如:压缩边界. 3.内存的动态恢 ...
- 由一道面试题想到的:Finally
找工作时,有这样一道题: try{}里面有一条return语句,那么紧跟在这个try后的finally{}里的代码会不会执行,什么时候执行,在return之前还是之后? 我没有怎么思考,根据脑子里仅有 ...
- android EditText问题多行文本输入
一旦习惯了网络和swing在文本框输入,我们Android突然缺乏这样的管制,刚开始使用它是相当费力.为了要实现多行文本输入框和显示.逐一克服这些问题,如下面: 1. 怎么做EditText显示区域在 ...