Mien ‘s blog

--人类为更好的生存在奋斗,人应当为人类的进步而努力。
--Human Beings strive for Better survival, man should devote to the development of human beings.

导航

公告

文章分类

随笔档案

最新评论

统计

常用链接

我的链接

阅读排行榜

评论排行榜

jQuery intellisense in visual studio

解决jquery在vs中智能提示的问题。

Problems:

  1.智能提示  2.所有页面提示  3.Url非静态

Solution:

step1. download jQuery files as well as Visual Studio autocomplete documentation from here.

Step2. and then include them in your project without changing the name structure, which should be like "<jsLib>.js", "<jsLib>-vsdoc.js". 

step3. and then make a reference.  Take an asp.net MVC project as example, the fowllowing lines placed in the head of a master page works perfect. (you should change the URL upon your situation)

 

    <script src="<%=Url.Content("~/Scripts/jquery-1.3.2.min.js") %>" type="text/javascript"></script>
    
<%if (false)
      {
    
%>
    
<script src="http://www.cnblogs.com/../Scripts/jquery-1.3.2.min.js" type="text/javascript"></script>
    
<script src="http://www.cnblogs.com/../Scripts/jquery-1.3.2.min-vsdoc.js" type="text/javascript"></script>
    
<%
        }
    
%>

or

 

<script src="<%=Url.Content("~/Scripts/jquery-1.3.2.min.js") %>" type="text/javascript"></script>
<% #if DEBUG %>
    
<script src="http://www.cnblogs.com/../Scripts/jquery-1.2.6.min.js" type="text/javascript"></script>
    
<script src="http://www.cnblogs.com/../Scripts/jquery-1.2.6.min-vsdoc.js" type="text/javascript"></script>
<% #endi%>

 

 

Alternatively, you can download a patch for visual studio 2008 (with sp1) from here, and learn more from here, and then just include jQuery file in your pages.

 

------------------------------------------------------

No copy right, No feed back. Just take it for any use. _ by Mien

------------------------------------------------------

 

posted on 2009-03-02 06:16 Mien Ng 阅读(333) 评论(0) 编辑 收藏