-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmy_zoom.html
51 lines (36 loc) · 1.11 KB
/
my_zoom.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
<style type="text/css">
#range {
width:70%;
overflow:hidden;
position:relative;
border: 1px solid black;
}
#container-zoom { position:absolute; }
</style>
<div id="range">
<div id="container-zoom">
<img class="mapzoom target" data-zoom="0" src="./imagezoom.jpg" id="map-image">
</div>
</div>
<br>
<a href="javascript:void(0)" id="increase">more zoom +</a>
<br><br>
<a href="javascript:void(0)" id="decrease">reduce zoom -</a>
<script src="https://code.jquery.com/jquery-1.7.2.min.js"></script>
<script src="https://code.jquery.com/ui/1.7.2/jquery-ui.min.js"></script>
<script src="./rjszoom.js"></script>
<script>
//The lib now only have one global var that is rjsZoom :)
var myZoom = rjsZoom('#range', '#container-zoom', '#map-image');
myZoom.initZoom();
$('#increase').click(function(){
myZoom.increaseZoom();
});
$('#decrease').click(function(){
myZoom.decreaseZoom();
});
window.addEventListener("resize", function(){
myZoom.initZoom();
});
</script>
<!-- <script src="./my_zoom.js"></script> -->