I read ScottGu's blog entry (http://weblogs.asp.net/scottgu/archive/2008/11/21/jquery-intellisense-in-vs-2008.aspx) a while back, and it seems to imply more functionality than I'm seeing. I have VS2008 and its service pack installed, and I am using a new MVC project with the RC1 version of asp.net MVC. I referenced the jquery-1.2.6.js script, and I can see intellisense when I type "$." but anything after that shows nothing. This isn't particularly helpful for a jquery novice like me, so I'm hopeful that I've just forgotten something.
For example, when I try to use the specific script example in Scott's blog post:
(source: scottgu.com)
I don't get any intellisense action for the "attr" that he shows the tooltip for. Should I expect this intellisense help, and if so, what can I look for to address the problem?
Here's my script reference. It's declared in a master page, FWIW, and my attempted use of jquery is in my page that references this master page.
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="~/Content/styles/default.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="~/Content/scripts/jquery-1.2.6.js"></script>
Have you installed the jQuery-vsdoc.js file as well (in the same location as jquery-1.2.6.js)? This file contains the comments for intellisense. It's documented in step 3 of ScottGu's blog post.
Update:
And you also installed the Visual Studio patch?
For me it works (as shown in ScottGu's blog), although I'm using a website project, not MVC. I added the script reference in the master page:
<script src="jquery-1.3.1.js" type="text/javascript"></script>
I get intellisense in both the master page and in content pages (tried it with the code you put in your question).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With