views:

85

answers:

2

jquery intellisense works fine with standard setup (asp.net mvc)

<script src="../../Scripts/jquery-1.3.2.js" type="text/javascript"></script>

with jquery-1.3.2-vsdoc.js in same folder

if added new script to head like

<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js" type="text/javascript"></script>

jq intelisense stops working

so how to add new scripts like above and keep intelisense working ?

A: 

You can include the vsdoc.js file in a

<%if(false){%>
<%}%>

construct, to hide it from the live site but still have VS2008 process it. Do this after the CDN script inclusion.

DDaviesBrackett
hmm, I've added like you suggested this but still no intellisense<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js" type="text/javascript"></script> <% if (false) { %><script type="text/javascript" src="../../Scripts/jquery-1.3.2-vsdoc.js"></script><% } %>
daniel
A: 

Or you can use this code for controls that are dinamicaly load in the page. put this code in your ascx:

<asp:Panel ID="teste" runat="server" Visible="true">  
   <% If (false) {%>  
        <script type="text/javascript" src="Scripts/BaseLibrary/jquery.js"></ script>        
   <%}%>  
</ Asp: Panel> 

I hope to help and sorry for my english =^.~=

Thiago da Silva Andrade Soare