-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathindex.html
More file actions
58 lines (53 loc) · 2.22 KB
/
index.html
File metadata and controls
58 lines (53 loc) · 2.22 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>jQuery simple Slider</title>
<link rel="stylesheet" href="./css/slider.css">
<style>
body {
max-width: 1024px;
width: 100%;
margin: 0 auto;
padding: 20px;
font-size: 14px;
font-family: Helvetica, Arial, sans-serif;
}
</style>
</head>
<body>
<div class="slider-container">
<div class="slider">
<div class="slider__item">
<img src="images/1.jpg" alt="">
<span class="slider__caption">Lorem ipsum dolor sit amet, consectetur adipisicing elit.<a href="">Далее >></a> </span>
</div>
<div class="slider__item">
<img src="images/2.jpg" alt="">
<span class="slider__caption">2 Lorem ipsum dolor sit amet, consectetur adipisicing elit. Culpa, facilis.</span>
</div>
<div class="slider__item">
<img src="images/3.jpg" alt="">
<span class="slider__caption">3 Lorem ipsum dolor sit amet, consectetur adipisicing elit. Suscipit, culpa!</span>
</div>
</div>
<div class="slider__switch slider__switch--prev" data-ikslider-dir="prev">
<span><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M13.89 17.418c.27.272.27.71 0 .98s-.7.27-.968 0l-7.83-7.91c-.268-.27-.268-.706 0-.978l7.83-7.908c.268-.27.7-.27.97 0s.267.71 0 .98L6.75 10l7.14 7.418z"/></svg></span>
</div>
<div class="slider__switch slider__switch--next" data-ikslider-dir="next">
<span><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M13.25 10L6.11 2.58c-.27-.27-.27-.707 0-.98.267-.27.7-.27.968 0l7.83 7.91c.268.27.268.708 0 .978l-7.83 7.908c-.268.27-.7.27-.97 0s-.267-.707 0-.98L13.25 10z"/></svg></span>
</div>
</div>
<p><a href="http://codepen.io/collection/DRRYeL/">More examples</a></p>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="./lib/jquery-1.11.1.min.js"><\/script>')</script>
<script src="./src/slider.js"></script>
<script>
$(".slider-container").ikSlider({
speed: 500
});
$(".slider-container").on('changeSlide.ikSlider', function (evt) { console.log(evt.currentSlide); });
</script>
</body>
</html>