Nextrek
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
|
<div class="display_menu">
<div class="menu_item menu_close" style="float:right;margin:20px 10px 0 0">
<a href="javascript:void(0)"><img src="data/others/plugin/theme_kopanda_09_1/image/system/menu_button_close.png" /></a>
</div>
<img class="button_smart button_arrow_up" src="data/others/plugin/theme_kopanda_09_1/image/system/arrow_up.png" style="cursor:pointer;left:540px;top:50px;position:absolute;">
<img class="button_smart button_arrow_down" src="data/others/plugin/theme_kopanda_09_1/image/system/arrow_down.png" style="cursor:pointer;left:650px;top:50px;position:absolute;">
<div style="clear:both"></div>
<div class="log_body" id="touchbox"></div>
<img class="img_bg_base" src="data/others/plugin/theme_kopanda_09_1/image/system/menu_log_bg.jpg" style="z-index:-1;left:0;top:0;width:100%;height:100%;position:absolute;">
<script class="menu_close">
var tmp_src = "";
$(".menu_close").hover(function(){
tmp_src = $(this).find("img").attr("src");
var img_src = tmp_src.replace(".png","2.png");
$(this).find("img").attr("src",img_src);
},
function(){
$(this).find("img").attr("src",tmp_src);
});
</script>
<script>
$(function(){
var box = $('#touchbox')[0];
var touchStartPositionX;
var touchStartPositionY;
var touchMovePositionX;
var touchMovePositionY;
var moveFarX;
var moveFarY;
var startScrollX;
var startScrollY;
var moveScrollX;
var moveScrollY;
box.addEventListener("touchstart",touchHandler,false);
box.addEventListener("touchmove",touchHandler,false);
function touchHandler(e){
var touch = e.touches[0];
if(e.type == "touchstart"){
touchStartPositionX = touch.pageX;
touchStartPositionY = touch.pageY;
//タッチ前スクロールをとる
startScrollX = $('#touchbox').scrollLeft();
startScrollY = $('#touchbox').scrollTop();
}
if(e.type == "touchmove"){
e.preventDefault();
//現在の座標を取得
touchMovePositionX = touch.pageX;
touchMovePositionY = touch.pageY;
//差をとる
moveFarX = touchStartPositionX - touchMovePositionX;
moveFarY = touchStartPositionY - touchMovePositionY;
//スクロールを動かす
moveScrollX = startScrollX +moveFarX;
moveScrollY = startScrollY +moveFarY;
$('#touchbox').scrollLeft(moveScrollX);
$('#touchbox').scrollTop(moveScrollY);
}
}
});
</script>
|
Revision |
Author |
Commited |
Message |
1365
|
FMMortaroli
|
Mon 30 Mar, 2020 21:05:49 +0000 |
|