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
|
|
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
|
|
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 |
0aee3c58
|
Assos Assos
|
<h3 class="nav-header">Other Examples</h3>
|
30 |
85ad3d82
|
Assos Assos
|
<nav>
|
31 |
|
|
<ul>
|
32 |
0aee3c58
|
Assos Assos
|
<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 |
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 class="active"><a href="dynamic-carousel-min-max.html">Carousel with dynamic min/max ranges</a></li>
|
40 |
|
|
<li><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 |
|
|
|
46 |
|
|
<div id="main" role="main">
|
47 |
|
|
<section class="slider">
|
48 |
|
|
<div class="flexslider carousel">
|
49 |
|
|
<ul class="slides">
|
50 |
|
|
<li>
|
51 |
|
|
<img src="images/kitchen_adventurer_cheesecake_brownie.jpg" />
|
52 |
|
|
</li>
|
53 |
|
|
<li>
|
54 |
|
|
<img src="images/kitchen_adventurer_lemon.jpg" />
|
55 |
|
|
</li>
|
56 |
|
|
<li>
|
57 |
|
|
<img src="images/kitchen_adventurer_donut.jpg" />
|
58 |
|
|
</li>
|
59 |
|
|
<li>
|
60 |
|
|
<img src="images/kitchen_adventurer_caramel.jpg" />
|
61 |
|
|
</li>
|
62 |
|
|
<li>
|
63 |
|
|
<img src="images/kitchen_adventurer_cheesecake_brownie.jpg" />
|
64 |
|
|
</li>
|
65 |
|
|
<li>
|
66 |
|
|
<img src="images/kitchen_adventurer_lemon.jpg" />
|
67 |
|
|
</li>
|
68 |
|
|
<li>
|
69 |
|
|
<img src="images/kitchen_adventurer_donut.jpg" />
|
70 |
|
|
</li>
|
71 |
|
|
<li>
|
72 |
|
|
<img src="images/kitchen_adventurer_caramel.jpg" />
|
73 |
|
|
</li>
|
74 |
|
|
<li>
|
75 |
|
|
<img src="images/kitchen_adventurer_cheesecake_brownie.jpg" />
|
76 |
|
|
</li>
|
77 |
|
|
<li>
|
78 |
|
|
<img src="images/kitchen_adventurer_lemon.jpg" />
|
79 |
|
|
</li>
|
80 |
|
|
<li>
|
81 |
|
|
<img src="images/kitchen_adventurer_donut.jpg" />
|
82 |
|
|
</li>
|
83 |
|
|
<li>
|
84 |
|
|
<img src="images/kitchen_adventurer_caramel.jpg" />
|
85 |
|
|
</li>
|
86 |
|
|
</ul>
|
87 |
|
|
</div>
|
88 |
|
|
</section>
|
89 |
|
|
<aside>
|
90 |
|
|
<div class="cf">
|
91 |
|
|
<h3>Carousel With Min & Max Ranges</h3>
|
92 |
|
|
<ul class="toggle cf">
|
93 |
|
|
<li class="js"><a href="#view-js">JS</a></li>
|
94 |
|
|
<li class="html"><a href="#view-html">HTML</a></li>
|
95 |
|
|
</ul>
|
96 |
|
|
</div>
|
97 |
|
|
<div id="view-js" class="code">
|
98 |
|
|
<pre class="brush: js; toolbar: false; gutter: false;">
|
99 |
|
|
(function() {
|
100 |
|
|
|
101 |
|
|
// store the slider in a local variable
|
102 |
|
|
var $window = $(window),
|
103 |
|
|
flexslider;
|
104 |
|
|
|
105 |
|
|
// tiny helper function to add breakpoints
|
106 |
|
|
function getGridSize() {
|
107 |
|
|
return (window.innerWidth < 600) ? 2 :
|
108 |
|
|
(window.innerWidth < 900) ? 3 : 4;
|
109 |
|
|
}
|
110 |
|
|
|
111 |
|
|
$(function() {
|
112 |
|
|
SyntaxHighlighter.all();
|
113 |
|
|
});
|
114 |
|
|
|
115 |
|
|
$window.load(function() {
|
116 |
|
|
$('.flexslider').flexslider({
|
117 |
|
|
animation: "slide",
|
118 |
|
|
animationLoop: false,
|
119 |
|
|
itemWidth: 210,
|
120 |
|
|
itemMargin: 5,
|
121 |
|
|
minItems: getGridSize(), // use function to pull in initial value
|
122 |
|
|
maxItems: getGridSize() // use function to pull in initial value
|
123 |
|
|
});
|
124 |
|
|
});
|
125 |
|
|
|
126 |
|
|
// check grid size on resize event
|
127 |
|
|
$window.resize(function() {
|
128 |
|
|
var gridSize = getGridSize();
|
129 |
|
|
|
130 |
|
|
flexslider.vars.minItems = gridSize;
|
131 |
|
|
flexslider.vars.maxItems = gridSize;
|
132 |
|
|
});
|
133 |
|
|
}());
|
134 |
|
|
</pre>
|
135 |
|
|
</div>
|
136 |
|
|
<div id="view-html" class="code">
|
137 |
|
|
<pre class="brush: xml; toolbar: false; gutter: false;">
|
138 |
|
|
<!-- Place somewhere in the <body> of your page -->
|
139 |
|
|
<div class="flexslider">
|
140 |
|
|
<ul class="slides">
|
141 |
|
|
<li>
|
142 |
|
|
<img src="slide1.jpg" />
|
143 |
|
|
</li>
|
144 |
|
|
<li>
|
145 |
|
|
<img src="slide2.jpg" />
|
146 |
|
|
</li>
|
147 |
|
|
<li>
|
148 |
|
|
<img src="slide3.jpg" />
|
149 |
|
|
</li>
|
150 |
|
|
<li>
|
151 |
|
|
<img src="slide4.jpg" />
|
152 |
|
|
</li>
|
153 |
|
|
<!-- items mirrored twice, total of 12 -->
|
154 |
|
|
</ul>
|
155 |
|
|
</div>
|
156 |
|
|
</pre>
|
157 |
|
|
</div>
|
158 |
|
|
</aside>
|
159 |
|
|
</div>
|
160 |
|
|
|
161 |
|
|
</div>
|
162 |
|
|
|
163 |
|
|
|
164 |
|
|
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>
|
165 |
|
|
<script>window.jQuery || document.write('<script src="js/libs/jquery-1.7.min.js">\x3C/script>')</script>
|
166 |
|
|
|
167 |
|
|
|
168 |
|
|
<script defer src="../jquery.flexslider.js"></script>
|
169 |
|
|
|
170 |
|
|
<script type="text/javascript">
|
171 |
|
|
|
172 |
|
|
(function() {
|
173 |
|
|
|
174 |
|
|
|
175 |
|
|
var $window = $(window),
|
176 |
|
|
flexslider;
|
177 |
|
|
|
178 |
|
|
|
179 |
|
|
function getGridSize() {
|
180 |
|
|
return (window.innerWidth < 600) ? 2 :
|
181 |
|
|
(window.innerWidth < 900) ? 3 : 4;
|
182 |
|
|
}
|
183 |
|
|
|
184 |
|
|
$(function() {
|
185 |
|
|
SyntaxHighlighter.all();
|
186 |
|
|
});
|
187 |
|
|
|
188 |
|
|
$window.load(function() {
|
189 |
|
|
$('.flexslider').flexslider({
|
190 |
|
|
animation: "slide",
|
191 |
|
|
animationSpeed: 400,
|
192 |
|
|
animationLoop: false,
|
193 |
|
|
itemWidth: 210,
|
194 |
|
|
itemMargin: 5,
|
195 |
|
|
minItems: getGridSize(),
|
196 |
|
|
maxItems: getGridSize(),
|
197 |
|
|
start: function(slider){
|
198 |
|
|
$('body').removeClass('loading');
|
199 |
|
|
flexslider = slider;
|
200 |
|
|
}
|
201 |
|
|
});
|
202 |
|
|
});
|
203 |
|
|
|
204 |
|
|
|
205 |
|
|
$window.resize(function() {
|
206 |
|
|
var gridSize = getGridSize();
|
207 |
|
|
|
208 |
|
|
flexslider.vars.minItems = gridSize;
|
209 |
|
|
flexslider.vars.maxItems = gridSize;
|
210 |
|
|
});
|
211 |
|
|
}());
|
212 |
|
|
|
213 |
|
|
</script>
|
214 |
|
|
|
215 |
|
|
|
216 |
|
|
|
217 |
|
|
<script type="text/javascript" src="js/shCore.js"></script>
|
218 |
|
|
<script type="text/javascript" src="js/shBrushXml.js"></script>
|
219 |
|
|
<script type="text/javascript" src="js/shBrushJScript.js"></script>
|
220 |
|
|
|
221 |
|
|
|
222 |
|
|
<script src="js/jquery.easing.js"></script>
|
223 |
|
|
<script src="js/jquery.mousewheel.js"></script>
|
224 |
|
|
<script defer src="js/demo.js"></script>
|
225 |
|
|
|
226 |
|
|
</body>
|
227 |
|
|
</html> |