Projet

Général

Profil

Paste
Télécharger (7,27 ko) Statistiques
| Branche: | Révision:

root / drupal7 / sites / all / libraries / flexslider-2.5.0 / demo / video.html @ 4b706e38

1 85ad3d82 Assos Assos
<!DOCTYPE html>
2
<html class="no-js" lang="en">
3
<head>
4
        <meta content="charset=utf-8">
5
        <title>FlexSlider 2</title>
6
        <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
7
8 0aee3c58 Assos Assos
  <!-- Syntax Highlighter -->
9
  <link href="css/shCore.css" rel="stylesheet" type="text/css" />
10
  <link href="css/shThemeDefault.css" rel="stylesheet" type="text/css" />
11 85ad3d82 Assos Assos
  <!-- Demo CSS -->
12
        <link rel="stylesheet" href="css/demo.css" type="text/css" media="screen" />
13
        <link rel="stylesheet" href="../flexslider.css" type="text/css" media="screen" />
14
15
        <!-- Modernizr -->
16
  <script src="js/modernizr.js"></script>
17
18
</head>
19
<body class="loading">
20
21
  <div id="container" class="cf">
22
    <header role="navigation">
23
      <a class="logo" href="http://www.woothemes.com" title="WooThemes">
24
        <img src="images/logo.png" alt="WooThemes" />
25
          </a>
26
      <h1>FlexSlider 2</h1>
27
      <h2>The best responsive slider. Period.</h2>
28
      <a class="button green" href="https://github.com/woothemes/FlexSlider/zipball/master">Download Flexslider</a>
29
      <h3 class="nav-header">Other Examples</h3>
30
      <nav>
31
        <ul>
32
          <li><a href="index.html">Basic Slider</a></li>
33 0aee3c58 Assos Assos
          <li><a href="basic-slider-with-custom-direction-nav.html">Basic Slider customDirectionNav</a></li>
34
          <li><a href="basic-slider-with-caption.html">Basic Slider with Simple Caption</a></li>
35 85ad3d82 Assos Assos
          <li><a href="thumbnail-controlnav.html">Slider w/thumbnail controlNav pattern</a></li>
36
          <li><a href="thumbnail-slider.html">Slider w/thumbnail slider</a></li>
37
          <li><a href="basic-carousel.html">Basic Carousel</a></li>
38
          <li><a href="carousel-min-max.html">Carousel with min and max ranges</a></li>
39
          <li><a href="dynamic-carousel-min-max.html">Carousel with dynamic min/max ranges</a></li>
40
          <li class="active"><a href="video.html">Video & the api (vimeo)</a></li>
41
          <li><a href="video-wistia.html">Video & the api (wistia)</a></li>
42
        </ul>
43
      </nav>
44
    </header>
45
    <div id="main" role="main">
46
      <section class="slider">
47
        <div class="flexslider">
48
          <ul class="slides">
49
            <li>
50
              <iframe id="player_1" src="http://player.vimeo.com/video/39683393?api=1&amp;player_id=player_1" width="500" height="281" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
51
                              </li>
52
                              <li>
53
                          <img src="images/kitchen_adventurer_lemon.jpg" />
54
                              </li>
55
                              <li>
56
                          <img src="images/kitchen_adventurer_donut.jpg" />
57
                              </li>
58
                              <li>
59
                          <img src="images/kitchen_adventurer_caramel.jpg" />
60
                              </li>
61
          </ul>
62
        </div>
63
      </section>
64
      <aside>
65
        <div class="cf">
66
          <h3>Video</h3>
67
          <ul class="toggle cf">
68
            <li class="js"><a href="#view-js">JS</a></li>
69
            <li class="html"><a href="#view-html">HTML</a></li>
70
          </ul>
71
        </div>
72
        <div id="view-js" class="code">
73
          <pre class="brush: js; toolbar: false; gutter: false;">
74
            // Can also be used with $(document).ready()
75
            $(window).load(function() {
76
77
              // Vimeo API nonsense
78
              var player = document.getElementById('player_1');
79
              $f(player).addEvent('ready', ready);
80
81
              function addEvent(element, eventName, callback) {
82
                if (element.addEventListener) {
83
                  element.addEventListener(eventName, callback, false)
84
                } else {
85
                  element.attachEvent(eventName, callback, false);
86
                }
87
              }
88
89
              function ready(player_id) {
90
                var froogaloop = $f(player_id);
91
                froogaloop.addEvent('play', function(data) {
92
                  $('.flexslider').flexslider("pause");
93
                });
94
                froogaloop.addEvent('pause', function(data) {
95
                  $('.flexslider').flexslider("play");
96
                });
97
              }
98
99
100
              // Call fitVid before FlexSlider initializes, so the proper initial height can be retrieved.
101
              $(".flexslider")
102
                .fitVids()
103
                .flexslider({
104
                  animation: "slide",
105
                  useCSS: false,
106
                  animationLoop: false,
107
                  smoothHeight: true,
108
                  before: function(slider){
109
                    $f(player).api('pause');
110
                  }
111
              });
112
            });
113
          </pre>
114
        </div>
115
        <div id="view-html" class="code">
116
          <pre class="brush: xml; toolbar: false; gutter: false;">
117
            &lt;!-- Place somewhere in the &lt;body&gt; of your page -->
118
            &lt;div class="flexslider">
119
              &lt;ul class="slides">
120
                &lt;li>
121
                  &lt;iframe id="player_1" src="http://player.vimeo.com/video/39683393?api=1&amp;player_id=player_1" width="500" height="281" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen>&lt;/iframe>
122
                &lt;/li>
123
                &lt;li>
124
                  &lt;img src="slide2.jpg" />
125
                &lt;/li>
126
                &lt;li>
127
                  &lt;img src="slide3.jpg" />
128
                &lt;/li>
129
                &lt;li>
130
                  &lt;img src="slide4.jpg" />
131
                &lt;/li>
132
              &lt;/ul>
133
            &lt;/div>
134
          </pre>
135
        </div>
136
      </aside>
137
    </div>
138
139
  </div>
140
141
  <!-- jQuery -->
142
  <script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
143
  <script>window.jQuery || document.write('<script src="js/libs/jquery-1.7.min.js">\x3C/script>')</script>
144
145
  <!-- FlexSlider -->
146
  <script defer src="../jquery.flexslider.js"></script>
147
148
  <script type="text/javascript">
149
    $(function(){
150
      SyntaxHighlighter.all();
151
    });
152
    $(window).load(function(){
153

154
      // Vimeo API nonsense
155
      var player = document.getElementById('player_1');
156
      $f(player).addEvent('ready', ready);
157

158
      function addEvent(element, eventName, callback) {
159
        (element.addEventListener) ? element.addEventListener(eventName, callback, false) : element.attachEvent(eventName, callback, false);
160
      }
161

162
      function ready(player_id) {
163
        var froogaloop = $f(player_id);
164

165
        froogaloop.addEvent('play', function(data) {
166
          $('.flexslider').flexslider("pause");
167
        });
168

169
        froogaloop.addEvent('pause', function(data) {
170
          $('.flexslider').flexslider("play");
171
        });
172
      }
173

174

175
      // Call fitVid before FlexSlider initializes, so the proper initial height can be retrieved.
176
      $(".flexslider")
177
        .fitVids()
178
        .flexslider({
179
          animation: "slide",
180
          useCSS: false,
181
          animationLoop: false,
182
          smoothHeight: true,
183
          start: function(slider){
184
            $('body').removeClass('loading');
185
          },
186
          before: function(slider){
187
            $f(player).api('pause');
188
          }
189
      });
190
    });
191
  </script>
192
193
   <!-- Syntax Highlighter -->
194
        <script type="text/javascript" src="js/shCore.js"></script>
195
        <script type="text/javascript" src="js/shBrushXml.js"></script>
196
        <script type="text/javascript" src="js/shBrushJScript.js"></script>
197
198
  <!-- Optional FlexSlider Additions -->
199
    <script src="js/froogaloop.js"></script>
200
        <script src="js/jquery.fitvid.js"></script>
201
        <script src="js/demo.js"></script>
202
203
</body>
204
</html>