swipe 이벤트 플러그인 변경으로 인한 코드 수정

This commit is contained in:
chicpro
2013-10-18 11:43:10 +09:00
parent d918a45769
commit 0d3652559d
7 changed files with 68 additions and 749 deletions

View File

@ -66,7 +66,8 @@ function pg_anchor($info) {
}
?>
<script src="<?php echo G5_JS_URL ?>/jquery.floatmenu.js"></script>
<script src="<?php echo G5_JS_URL; ?>/jquery.touchwipe.min.js"></script>
<script src="<?php echo G5_JS_URL; ?>/jquery.floatmenu.js"></script>
<div id="info_top_layer">
<h2>상품 정보</h2>
@ -110,6 +111,17 @@ $(function() {
}, timeout);
});
$(window).touchwipe({
wipeUp: function() {
$("#info_top_layer").floatTopMenu("hide");
},
wipeDown: function() {
$("#info_top_layer").floatTopMenu("hide");
},
min_move_y: 5,
preventDefaultEvents: false
});
if(navigator.userAgent.toLowerCase().indexOf("android") > -1) {
$(window).on("resize", function(e) {
setTimeout(function() {
@ -126,14 +138,6 @@ $(function() {
$("#info_top_layer").floatTopMenu("show");
}, timeout);
});
// scroll event enable
$(window).on("movestart", function(e) {
if ((e.distX > e.distY && e.distX < -e.distY) ||
(e.distX < e.distY && e.distX > -e.distY)) {
e.preventDefault();
}
});
});
</script>