Jquery – Conditionally selecting a version of jquery depending on environment

intellisensejqueryvisual-studio-2008

I have 2 references to jQuery in my master page which is currently configured for production release:

<script type="text/javascript"
 src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js">
</script>
<%--<script type="text/javascript" src="../Scripts/jquery-vsdoc.js"></script>--%>

When I'm developing, I uncomment the vsdoc version so that I get intellisense in VS2008 and then switch it back before deploying it – except for the times that I forget. Is there a way to have intellisense in dev and use the Google CDN in prod that doesn't require an edit to deploy? i.e. a conditional inclusion dependent on environment…

EDIT:
If I specify this file: http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js as my JavaScript file then VS2008 (with patch) will look for this file: http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min-vsdoc.js (with -vsdoc just before the .js) to use for intellisense. The problem is that Google does not provide the second named file in that location.

Another acceptable answer would be the answer to this question: "How do I get Google to put a jquery.min-vsdoc.js file at http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/ ?"

Best Answer

The suggested workaround (since Google doesn't host the documentation) is to reference the documentation script in a way that will never be included, for example

<% if (false) { %>
    <script type="text/javascript" src="../Scripts/jquery-vsdoc.js"></script>
<% } %>

OR

<asp:PlaceHolder runat="server" Visible="False">
    <script type="text/javascript" src="../Scripts/jquery-vsdoc.js"></script>
</asp:PlaceHolder>