简体   繁体   English

为什么ASP.NET MVC2中的VS2010给了我错误的JQuery intellisense?

[英]Why is VS2010 in ASP.NET MVC2 giving me the wrong JQuery intellisense?

In ASP.NET MVC'S JQuery intelligence I am getting methods such as " constructor ", " toString ", etc. 在ASP.NET MVC的JQuery智能中,我得到了诸如“ constructor ”,“ toString ”等方法。

What do I have to do so that I get JQuery methods such as "css" and "click"? 我需要做什么才能获得诸如“css”和“click”之类的JQuery方法?

alt text http://www.deviantsart.com/upload/tr7rto.png 替代文字http://www.deviantsart.com/upload/tr7rto.png

If I just rightclick on a plain .htm file and open up Visual Studio, it works out-of-the-box: 如果我只是右键单击一个普通的.htm文件并打开Visual Studio,它就可以开箱即用:

alt text http://www.deviantsart.com/upload/1u0q1uf.png 替代文字http://www.deviantsart.com/upload/1u0q1uf.png

You need a reference to the jquery vsdoc js file - something like this: 你需要一个jquery vsdoc js文件的引用 - 像这样:

<script src="../../Scripts/jquery-1.4.1-vsdoc.js" type="text/javascript"></script>

ScottGu made a post about this in relation to VS 2008 a while ago which is still a useful read for VS2010 ScottGu不久前发表了一篇关于VS 2008的帖子,这对于VS2010来说仍然是一个有用的读物

http://weblogs.asp.net/scottgu/archive/2008/11/21/jquery-intellisense-in-vs-2008.aspx http://weblogs.asp.net/scottgu/archive/2008/11/21/jquery-intellisense-in-vs-2008.aspx

Do you have the jQuery VSDoc version in the project? 你在项目中有jQuery VSDoc版本吗?

http://docs.jquery.com/Downloading_jQuery http://docs.jquery.com/Downloading_jQuery

Look for the “Documentation: Visual Studio” link under each major version. 在每个主要版本下查找“文档:Visual Studio”链接。 Currently the latest available is against 1.4.1. 目前最新的可用对抗1.4.1。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM