1
|
<!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
|
|
9
|
<link href="css/shCore.css" rel="stylesheet" type="text/css" />
|
10
|
<link href="css/shThemeDefault.css" rel="stylesheet" type="text/css" />
|
11
|
|
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
|
|
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
|
<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
|
<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&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
|
<!-- Place somewhere in the <body> of your page -->
|
118
|
<div class="flexslider">
|
119
|
<ul class="slides">
|
120
|
<li>
|
121
|
<iframe id="player_1" src="http://player.vimeo.com/video/39683393?api=1&player_id=player_1" width="500" height="281" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
|
122
|
</li>
|
123
|
<li>
|
124
|
<img src="slide2.jpg" />
|
125
|
</li>
|
126
|
<li>
|
127
|
<img src="slide3.jpg" />
|
128
|
</li>
|
129
|
<li>
|
130
|
<img src="slide4.jpg" />
|
131
|
</li>
|
132
|
</ul>
|
133
|
</div>
|
134
|
</pre>
|
135
|
</div>
|
136
|
</aside>
|
137
|
</div>
|
138
|
|
139
|
</div>
|
140
|
|
141
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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>
|