-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
30 lines (25 loc) · 918 Bytes
/
index.html
File metadata and controls
30 lines (25 loc) · 918 Bytes
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
---
layout: homepage
title: Home
---
<div id="img-con">
<img class="current" src="/assets/images/river.JPG" alt="River">
<img src="/assets/images/stream.JPG" alt="stream">
<img src="/assets/images/well.JPG" alt="Well">
<img src="/assets/images/river2.JPG" alt="River">
<img src="/assets/images/fields.JPG" alt="Fields">
</div>
<script>
function cycleImages(){
var $current = $('#img-con .current');
var $next = ($current.next().length > 0) ? $current.next() : $('#img-con img:first');
$next.css('z-index',2);//move the next image up the pile
$current.fadeOut(1500,function(){//fade out the top image
$current.css('z-index',1).show().removeClass('current');//reset the z-index and unhide the image
$next.css('z-index',3).addClass('current');//make the next image the top one
});
}
$(document).ready(function(){
setInterval('cycleImages()', 5000);
});
</script>