"flex box slide jquery"
Bootstrap 3.0.0 Snippet by evarevirus

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
37
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<!------ Include the above in your HEAD tag ---------->
<!-- styles personnalisés pour chaque slider -->
<style>
.container {
max-width: 960px;
margin: 0 auto;
}
.title {
font-size: 40px;
font-weight: 300;
text-align: center;
color: #90CAF9;
}
#slider-1 .slider,
#slider-2 .slider,
#slider-1 .slide,
#slider-2 .slide {
border: 1px solid rgba(0, 0, 0, 0.9);
}
#slider-1 .slide,
#slider-2 .slide {
background: #FF8F00;
height: 250px;
}
#slider-3 {
border: 4px solid #fff;
border-radius: 2px;
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
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
37
@import url(https://fonts.googleapis.com/css?family=Roboto:400,100,100italic,300,300italic,400italic,500,500italic,700,700italic,900,900italic);
@import url(http://fonts.googleapis.com/icon?family=Material+Icons);
* {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
html {
overflow-y: scroll;
font-size: 62.5%;
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
}
html,
body {
margin: 0;
height: 100%;
width: 100%;
}
body {
font-family: "Roboto", sans-serif;
font-weight: normal;
font-size: 16px;
font-size: 1.6rem;
}
/* slider */
.slider {
display: block;
width: 100%;
margin: 0 0 60px;
background: #fff;
position: relative;
z-index: 1;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
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
37
/*
Plugin
*/
(function($) {
$.fn.flexboxslider = function(opts) {
var options = $.extend({}, $.fn.flexboxslider.defaults, opts);
return this.each(function() {
var el = $(this), // el correspond au slider
$slides_container = el.find('.slider-wrapper'),
$slides = el.find('.slide'),
$slides_length = $slides.length,
prev = el.find('.slider-button--prev'),
next = el.find('.slider-button--next'),
slider_nav, // créé lors de l'initalisation
timer,
resizeTimer,
steps = 1,
current_step = 1,
items_per_step = 4;
function initialize() {
// initialisation du nombre d'étapes
items_per_step = options.items;
steps = Math.ceil($slides_length / items_per_step);
current_step = 1;
// DOM
$slides_container.wrap('<div class="slider-viewport"></div>');
if (options.show_nav) {
create_nav();
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Related: See More


Questions / Comments: