Существует ли версия jQuery где-нибудь, что я могу горячая ссылка к, не размещая файл?

Попробуйте это, для меня это работает над Chrome, Firefox и Safari. Вы исправите заголовок и нижний колонтитул к каждой странице, не перекрывая содержание страницы

HTML

<body>

  <header id="header">Header</header>

  <footer id="footer">footer</footer>

  <div id="content">
    Here your long long content...
    <p style="page-break-inside: avoid;">This text will not be broken between the pages</p>
  </div>

</body>
CSS

<style>
  @page {
    margin: 10mm;
  }

  body {
    font: 9pt sans-serif;
    line-height: 1.3;

    /* Avoid fixed header and footer to overlap page content */
    margin-top: 100px;
    margin-bottom: 50px;
  }

  #header {
    position: fixed;
    top: 0;
    width: 100%;
    height: 100px;
    /* For testing */
    background: yellow; 
    opacity: 0.5;
  }

  #footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    height: 50px;
    font-size: 6pt;
    color: #777;
    /* For testing */
    background: red; 
    opacity: 0.5;
  }

  /* Print progressive page numbers */
  .page-number:before {
    /* counter-increment: page; */
    content: "Pagina " counter(page);
  }

</style>

12
задан Eric 5 September 2009 в 14:28
поделиться

5 ответов

Yes, it's available on Google's CDN.

Everything you need is here: http://code.google.com/apis/libraries/

You can link directly to the javascript file: https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js

or use the google.load method


Update

Its also available on Microsoft's CDN or the jQuery CDN

31
ответ дан 2 December 2019 в 03:07
поделиться

Вы можете разместить его в Google одним из двух способов.

Метод 1

<script type="text/javascript" 
        src="http://www.google.com/jsapi"></script>
<script type="text/javascript">
  // You may specify partial version numbers, such as "1" or "1.3",
  //  with the same result. Doing so will automatically load the 
  //  latest version matching that partial revision pattern 
  //  (i.e. both 1 and 1.3 would load 1.3.2 today).
  google.load("jquery", "1.3.2");

  google.setOnLoadCallback(function() {
    // Place init code here instead of $(document).ready()
  });
</script>

Метод 2 (более распространенный)

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

Я знаю файл хоста jquery.com а также для пользователей, они могли перенаправить туда jquery-хостинг, чтобы использовать версию Google.

10
ответ дан 2 December 2019 в 03:07
поделиться
2
ответ дан 2 December 2019 в 03:07
поделиться

Microsoft теперь также размещает jQuery: http://www.asp.net/ajax/cdn/#4

3
ответ дан 2 December 2019 в 03:07
поделиться

В дополнение к JQuery, Google CDN также размещает JQueryUI и все стандартные темы Themeroller CSS UI (включая изображения!). Если вы планируете создать пользовательский интерфейс на основе JQuery, это очень полезно.

http://encosia.com/2009/10/11/do-you-know-about-this-undocumented-google-cdn-feature/

3
ответ дан 2 December 2019 в 03:07
поделиться
Другие вопросы по тегам:

Похожие вопросы: