This repository has been archived by the owner on Mar 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
189 lines (149 loc) · 6.55 KB
/
index.html
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
<!doctype html>
<!--[if lt IE 7 ]> <html class="ie ie6 lte9 lte8 lte7 no-js"> <![endif]-->
<!--[if IE 7 ]> <html class="ie ie7 lte9 lte8 lte7 no-js"> <![endif]-->
<!--[if IE 8 ]> <html class="ie ie8 lte9 lte8 no-js"> <![endif]-->
<!--[if IE 9 ]> <html class="ie ie9 lte9 no-js"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html class="notie no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Hero Slider by David J. Davis</title>
<link rel="stylesheet" href="css/hero.css" />
<link rel="stylesheet" href="../assets/stylesheets/app-sub-pages.css">
<script src="../assets/javascripts/vendor/modernizr.js"></script>
</head>
<body>
<h2 class="forkTitle"><a href="https://github.com/david-j-davis/ddHeroSlider" target="_blank" alt="View source on github."><img data-src='../assets/images/fork.svg' class='iconic'>Modifed flexbox (originally Susy framework) slider</a></h2>
<!-- Hero with 4 Box Index -->
<div class="module module-hero slideshow-wrapper">
<div class="inner-container">
<div class="hero-show">
<div class="slideshow-container hero-slide active" data-slide="firstSlide">
<div class="content">
<div class="main-block"><h3>Lorem ipsum dolor sit amet, consectetur adipisicing elit.</h3></div>
</div>
<div class="fullbg small-stacked" >
<img src="http://lorempixel.com/g/1000/600/business/1"/>
</div>
</div>
<div class="slideshow-container hero-slide" data-slide="secondSlide">
<div class="content">
<div class="main-block block-link"><h3>Lorem ipsum dolor sit amet.</h3></div>
</div>
<div class="fullbg small-stacked" >
<img src="http://lorempixel.com/g/1000/600/business/2"/>
</div>
</div>
<div class="slideshow-container hero-slide" data-slide="thirdSlide">
<div class="content">
<div class="main-block block-link"><h3>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor.</h3></div>
</div>
<div class="fullbg small-stacked" >
<img src="http://lorempixel.com/g/1000/600/business/3"/>
</div>
</div>
<div class="slideshow-container hero-slide" data-slide="fourthSlide">
<div class="content">
<div class="main-block block-link"><h3>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. </h3></div>
</div>
<div class="fullbg small-stacked" >
<img src="http://lorempixel.com/g/1000/600/business/4"/>
</div>
</div>
<div class="content slideshow">
<div class="boxes">
<a class="box hero-pagination active" data-link="firstSlide">
<span>Slide 1</span>
</a>
<a class="box hero-pagination" data-link="secondSlide">
<span>Slide 2</span>
</a>
<a class="box hero-pagination" data-link="thirdSlide">
<span>Slide 3</span>
</a>
<a class="box hero-pagination" data-link="fourthSlide">
<span>Slide 4</span>
</a>
</div>
</div>
</div>
<div class="floatcontainer">
<a href="#" class="hero-arrow-right icon" ></a>
</div>
</div>
</div>
<pre class="codeReveal"><code>
//-----------------------------------------
//jQuery code for the content gallery above
//-----------------------------------------
(function ( $ ) {
$.fn.ddHeroSlider = function() {
$('div.hero-slide:gt(0)').hide();
var slide = ['firstSlide', 'secondSlide', 'thirdSlide', 'fourthSlide'];
var startindex=0;
var divSlide = $('div.hero-slide');
var divPagin = $('a.hero-pagination');
var arrow = $('a.hero-arrow-right');
autoheroslideshow = setInterval(function(){
startindex++;
if (startindex == slide.length) {startindex=0;}
divSlide.removeClass('active').fadeOut();
divPagin.removeClass('active');
$('a.hero-pagination[data-link=' + slide[startindex] + ']').addClass('active');
$('div.hero-slide[data-slide=' + slide[startindex] + ']').addClass('active').fadeIn();
}, 2500) //End auto slide show
divPagin.click(function(e){
e.preventDefault();
clearInterval(autoheroslideshow);
var currLink = $(this).data('link');
divSlide.removeClass('active').fadeOut();
divPagin.removeClass('active');
$('a.hero-pagination[data-link=' + currLink + ']').addClass('active');
$('div.hero-slide[data-slide=' + currLink + ']').addClass('active').fadeIn();
})// End pagination function
arrow.click(function(e){
e.preventDefault();
clearInterval(autoheroslideshow);
var nextDiv = $('div.hero-slide.active').next(divSlide);
var nextPagin = $('a.hero-pagination.active').next(divPagin);
var theIndex = nextDiv.index();
if (theIndex <= 3) {
divSlide.not(nextDiv).removeClass('active').fadeOut();
divPagin.not(nextPagin).removeClass('active');
nextDiv.addClass('active').fadeIn();
nextPagin.addClass('active');
} else {
divSlide.not(nextDiv).removeClass('active').fadeOut();
divPagin.not(nextPagin).removeClass('active');
$('div.hero-slide:first').addClass('active').fadeIn();
$('a.hero-pagination:first').addClass('active');
}
})// End arrow function
};//End hero slider main function
$(window).resize(function() {
if(!Modernizr.mq('(min-width:440px)') ){
clearInterval(autoheroslideshow);
}
}) //End window resize
$(window).trigger('resize');
}( jQuery ));
</code></pre>
<h3 class="codeTitle"><a href="">Click to view jQuery code</a></h3>
<script src="http://code.jquery.com/jquery-latest.min.js"></script>
<script>window.jQuery || document.write('<script src="../assets/javascripts/vendor/jquery-2.1.1.min.js"><\/script>')</script>
<script src="js/libs/ddHeroSlider.js"></script>
<script src="../assets/javascripts/iconic.min.js"></script>
<script src="../assets/javascripts/subpagescripts.js"></script>
<script>
$('.hero-slide').ddHeroSlider();
</script>
<script>
(function(b,o,i,l,e,r){b.GoogleAnalyticsObject=l;b[l]||(b[l]=
function(){(b[l].q=b[l].q||[]).push(arguments)});b[l].l=+new Date;
e=o.createElement(i);r=o.getElementsByTagName(i)[0];
e.src='//www.google-analytics.com/analytics.js';
r.parentNode.insertBefore(e,r)}(window,document,'script','ga'));
ga('create','UA-35054083-1');ga('send','pageview');
</script>
</body>
</html>