1

I can get javascript intellisense going from and aspx or master page ie

<script src="../../Scripts/jquery-1.4.1-vsdoc.js"type="text/javascript"></script>  
<script type="text/javascript">
    $.isFunction( 
</script>  

gives me a drop down in vs2010.

I do all(most) of my js coding inside a js file. How do I get intellisense drop downs inside js files ?

Also, is there a vsdoc for ms ajax (MicrosoftAjax-vsdoc.js) ?

pnuts
  • 58,317
  • 11
  • 87
  • 139
user206890
  • 531
  • 6
  • 17
  • I completely missed the second part of that...I've never seen such a vsdoc file, the debug version would be the closest thing. – Nick Craver Jul 16 '10 at 15:02

1 Answers1

6

At the top of your .js file add this:

/// <reference path="jquery-1.4.1.js" />

Or make the path relative, if it's not in the same directory, it'll look for the jquery-1.4.1-vsdoc.js when grabbing it for intellisense, any file you reference like this it'll look for the -vsdoc version if available. As a side note, jQuery 1.4.2 has additional bug fixes you should consider upgrading :)

Nick Craver
  • 623,446
  • 136
  • 1,297
  • 1,155
  • And I also tried yep, well done. At the top of my js file, I put /// Sys.Net.WebServiceError( and then I got intellisense drop downs ... – user206890 Jul 19 '10 at 11:03