Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How much intellisense should I expect for jquery in VS2008?

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: alt text
(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>
like image 771
Chris Farmer Avatar asked Feb 18 '09 20:02

Chris Farmer


1 Answers

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).

like image 56
M4N Avatar answered Nov 15 '22 05:11

M4N