jQuery intellisense in visual studio

來源:互聯網
上載者:User

解決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>
<% #endif %>

 

 

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

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

 

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.