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

前端 未结 9 667
萌比男神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:34

    If you are including the annotated jQuery file in your source solely for intellisense, I recommend leveraging preprocessor directives to remove it from your view when you compile. Ala:

    <% #if (false) %>
      
      
    <% #endif %>
    

    Then later in your code you can really reference jQuery. This is handy when using the Google AJAX Libraries API, because you get all the benefits Google provides you, plus intellisense.

    Here is a sample of using the Libraries API:

    
    
    

提交回复
热议问题