Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

intellisense with jquery in visual studio 2010

I put those two above. But I get no intellisense with jquery.

<script src="@Url.Content("~/Scripts/jquery-ui-1.8.11.js")" type="text/javascript"></script>
<script src="../../Scripts/jquery-1.5.1-vsdoc.js" type="text/javascript"></script>

I also want to achieve intellisense in a javascript file, is it possible?


UPDATE:

jQuery(function ($) {
    $("").   //no click event handler comes up
});
like image 880
BlackFire27 Avatar asked Mar 05 '12 09:03

BlackFire27


1 Answers

Simple google search came up with this:

VS2010 Tips #7: How to make jQuery Intellisense work for external JavaScript file

Short answer:

/// <reference path="../../scripts/jquery-1.5.1-vsdoc.js"/>

Note that you can't use the @ sign inside js file like in a Asp.net-MVC View

Read this to learn how you can overcome this.

like image 52
gdoron is supporting Monica Avatar answered Oct 12 '22 02:10

gdoron is supporting Monica