解決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
------------------------------------------------------