代码之家  ›  专栏  ›  技术社区  ›  Chris Farmer Marcelo Cantos

在VS2008中,我应该对jquery有多大的智能感知?

  •  5
  • Chris Farmer Marcelo Cantos  · 技术社区  · 16 年前

    http://weblogs.asp.net/scottgu/archive/2008/11/21/jquery-intellisense-in-vs-2008.aspx

    例如,当我尝试使用Scott博客文章中的特定脚本示例时: alt text
    (来源: scottgu.com )

    对于他显示工具提示的“attr”,我没有得到任何智能感知操作。我应该期待这种智能感知帮助吗?如果是这样,我可以寻找什么来解决这个问题?

    <head runat="server">
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <link href="~/Content/styles/default.css" rel="stylesheet" type="text/css" />
        <script type="text/javascript" src="~/Content/scripts/jquery-1.2.6.js"></script>
    
    1 回复  |  直到 6 年前
        1
  •  8
  •   M4N    16 年前

    您是否也安装了jQuery-vsdoc.js文件(与jQuery-1.2.6.js位于同一位置)?此文件包含智能感知的注释。这在ScottGu博客文章的第三步中有所记录。

    您还安装了 Visual Studio patch ?

    对我来说,它是有效的(如ScottGu的博客所示),尽管我使用的是网站项目,而不是MVC。我在母版页中添加了脚本引用:

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

    我在母版页和内容页中都获得了智能感知(用你在问题中输入的代码尝试过)。