-
Notifications
You must be signed in to change notification settings - Fork 0
/
lb.html
53 lines (50 loc) · 1.88 KB
/
lb.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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>lightbox</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script src="fancybox/jquery.fancybox-1.2.5.js" type="text/javascript" charset="utf-8"></script>
<script src="jquery.easing.1.3.js" type="text/javascript" charset="utf-8"></script>
<script type='text/javascript' src='zoom/jquery.jqzoom1.0.1.js'></script>
<link rel="stylesheet" type="text/css" href="zoom/jqzoom.css" />
<link rel="stylesheet" type="text/css" href="fancybox/jquery.fancybox-1.2.5.css" media="screen" />
<script type="text/javascript">
$(function () {
$('#lightbox').jqzoom();
$('a.lightbox').fancybox({
'easingIn': 'easeInOutBack',
'easingOut': 'easeInOutBack',
callbackOnClose: function () {
$('a.lightbox').show();
}
});
$('#lightbox').click( function (){
$(this).hide();
});
$('.swapper').click( function () {
var origsrc = $('#shower').attr('src');
var clicked = $(this).attr('src');
$('#shower').attr('src', clicked);
$(this).attr('src', origsrc);
var newim = clicked.replace(/-thumb/i, '');
$('a.lightbox').attr('href', newim);
$('#lightbox').unbind();
$('#lightbox').jqzoom();
$('#lightbox').click( function (){
$(this).hide();
});
});
});
</script>
</head>
<body id="lb" onload="">
<a href="1.jpg" class='lightbox' id="lightbox"><img src='1-thumb.jpg' id='shower' title='derp'></a>
<p>
<img src='2-thumb.jpg' title='derp' class='swapper'></a>
<img src='3-thumb.jpg' title='derp' class='swapper'></a>
<img src='4-thumb.jpg' title='derp' class='swapper'></a>
<img src='5-thumb.jpg' title='derp' class='swapper'></a>
</body>
</html>