forked from Destru/JOSHUA
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.gallery.php
38 lines (38 loc) · 881 Bytes
/
app.gallery.php
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
<div id="gallery" class="window">
<h1>Image Gallery</h1>
<div id="slick">
<div class="slideshow"></div>
</div>
</div>
<script>
function galleryInit() {
// slideshow with pager
$('#slick .thumbs').remove();
$('.slideshow').before('<ul class="thumbs clearfix"/>').cycle({
speed: 500,
timeout: 2000,
delay: 0,
pause: true,
pauseOnPagerHover: true,
pager: '.thumbs',
pagerAnchorBuilder: function(idx, slide) {
var item = '<img src="'+$(slide).find('img').attr('src')+'" width="41" height="41">';
return '<li>'+item+'</li>';
}
});
}
$(function() {
// slide down pager
var adjust;
$('#slick').hover(function() {
adjust = $(this).find('ul').height()+10;
$(this).find('ul').animate({
'top': '-='+adjust+'px'
});
}, function() {
$(this).find('ul').animate({
'top': '+='+adjust+'px'
});
});
});
</script>