开发者

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.

What do I have to do so that I get JQuery methods such as "css" and "click"?

alt text http://www.deviantsart.com/upload/tr7rto.png

If I j开发者_如何学JAVAust rightclick on a plain .htm file and open up Visual Studio, it works out-of-the-box:

alt text http://www.deviantsart.com/upload/1u0q1uf.png


You need a reference to the jquery vsdoc js file - something like this:

<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

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?

http://docs.jquery.com/Downloading_jQuery

Look for the “Documentation: Visual Studio” link under each major version. Currently the latest available is against 1.4.1.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜