views:

49

answers:

2

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

If I just rightclick on a plain .htm file and open up Visual Studio, it works out-of-the-box:

alt text

+1  A: 

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.

James Wiseman
+2  A: 

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

Steve Willcock
I copied and pasted that line into my Site.Master file and voila it works now, thanks.
Edward Tanguay