【问题标题】:Insert jQuery's UI into page using Google使用 Google 将 jQuery 的 UI 插入页面
【发布时间】:2009-06-30 18:31:24
【问题描述】:

大家好,我目前使用 Google 的 API 将 jQuery 包含到我的网站中,如下所示:

<script src="http://www.google.com/jsapi"></script>
<script>google.load("jquery", "1.3.2");</script>

我将如何为 jQuery UI javascript 和 css 文件完成相同的操作?

【问题讨论】:

    标签: javascript jquery jquery-ui google-api


    【解决方案1】:

    对于 jQuery UI:

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

    这是最新版本。

    【讨论】:

      【解决方案2】:

      为了与您想要的方式保持一致:

      google.load("jquery", "1.3.2");
      google.load("jqueryui", "1.7.2");
      

      http://code.google.com/apis/ajaxlibs/documentation/index.html#jqueryUI

      【讨论】:

        【解决方案3】:

        由于您使用的是 Google API,因此您可以使用以下代码包含 jQuery UI:

        google.load("jqueryui", "1.5.3");
        

        查看文档here

        您需要在您的服务器上托管 CSS 主题。

        托管您自己的 CSS 文件可让您创建完全自定义的主题,请查看 Theme Roller

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 2011-11-10
          • 1970-01-01
          • 1970-01-01
          • 2010-10-02
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          相关资源
          最近更新 更多