How do you get JavaScript/jQuery Intellisense Working in Visual Studio 2008?

前端 未结 9 652
萌比男神i
萌比男神i 2020-12-07 08:23

I thought jQuery Intellisense was supposed to be improved with SP1. I even downloaded an annotated version of jQuery 1.2.6, but intellisense will not work in a separate jscr

相关标签:
9条回答
  • 2020-12-07 08:49

    You shouldn't need to actually reference the "-vsdoc" version. If you put the jquery-1.2.6-vsdoc.js in the same directory as jquery-1.2.6.js then Visual Studio will know to covert a jquery-1.2.6.js reference to jquery-1.2.6-vsdoc.js.

    I think that will actually work for any file.

    Hmmm... that gives a good workaround for another question on this site...

    Edit: This feature only works with VS2008 Service Pack 1.

    0 讨论(0)
  • 2020-12-07 08:53

    If you want to pick up the Intellisense file from the Microsoft CDN you can use:

    /// <reference path="http://ajax.microsoft.com/ajax/jQuery/jquery-1.4.1-vsdoc.js" />
    
    0 讨论(0)
  • 2020-12-07 08:59

    Make sure you're not using a minimized jQuery file.

    Use Ctrl + Shift + J to make it work after adding JavaScript files to the project.

    0 讨论(0)
提交回复
热议问题