jQuery


読み込み

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<!DOCTYPE html>
<html lang="ja">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>jQuery include sample</title>
  </head>
  <body>
    <p>jQuery 読み込みサンプル 本文</p>

    <!--[if lt IE 9]>
      <script
        src="//code.jquery.com/jquery-1.12.4.min.js"
        integrity="sha384-nvAa0+6Qg9clwYCGGPpDQLVpLNn0fRaROjHqs13t4Ggj3Ez50XnGQqc/r8MhnRDZ"
        crossorigin="anonymous"
      ></script>
      <script>window.jQuery || document.write('<script src="assets/vendor/jquery/jquery-1.12.4.min.js"><\/script>')</script>
    <![endif]--><!--[if (gte IE 9)|!(IE)]><!-->
      <script
        src="http://code.jquery.com/jquery-2.2.4.min.js"
        integrity="sha384-rY/jv8mMhqDabXSo+UCggqKtdmBfd3qC2/KvyTDNQ6PcUJXaxK1tMepoQda4g5vB"
        crossorigin="anonymous"
      ></script>
      <script>window.jQuery || document.write('<script src="assets/vendor/jquery/jquery-2.2.4.min.js"><\/script>')</script>
    <!--<![endif]-->
    <script>
      (function($) {
        'use strict';
        $(function() {
          $('body').css('color', 'red');
        });
      })(jQuery);
    </script>
  </body>
</html>