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

@ -6,9 +6,8 @@ define("_INDEX_", TRUE);
include_once(G5_MSHOP_PATH.'/shop.head.php');
?>
<script src="<?php echo G5_JS_URL; ?>/jquery.event.move.js"></script>
<script src="<?php echo G5_JS_URL; ?>/jquery.event.swipe.js"></script>
<script src="<?php echo G5_JS_URL ?>/jquery.slideview.js"></script>
<script src="<?php echo G5_JS_URL; ?>/jquery.touchwipe.min.js"></script>
<script src="<?php echo G5_JS_URL; ?>/jquery.slideview.js"></script>
<div id="sidx">

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>

View File

@ -3,9 +3,8 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
?>
<link rel="stylesheet" href="<?php echo G5_MSHOP_SKIN_URL; ?>/style.css">
<script src="<?php echo G5_JS_URL; ?>/jquery.event.move.js"></script>
<script src="<?php echo G5_JS_URL; ?>/jquery.event.swipe.js"></script>
<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>
<form name="fitem" action="<?php echo $action_url; ?>" method="post" onsubmit="return fitem_submit(this);">
<input type="hidden" name="it_id[]" value="<?php echo $it['it_id']; ?>">
@ -386,8 +385,8 @@ $(function(){
});
// 이전 다음상품 swipe
$(window)
.on("swipeleft", function(e) {
$(window).touchwipe({
wipeLeft: function() {
<?php if($next_href) { ?>
if($("#loading_message").length > 0)
return;
@ -435,8 +434,8 @@ $(function(){
<?php } else { ?>
alert("다음 상품이 없습니다.");
<?php } ?>
})
.on("swiperight", function(e) {
},
wipeRight: function() {
<?php if($prev_href) { ?>
if($("#loading_message").length > 0)
return;
@ -485,8 +484,20 @@ $(function(){
<?php } else { ?>
alert("이전 상품이 없습니다.");
<?php } ?>
});
},
wipeUp: function() {
$("#form_btn_layer").floatBottomMenu("hide");
},
wipeDown: function() {
$("#form_btn_layer").floatBottomMenu("hide");
},
min_move_x: 20,
min_move_y: 5,
preventDefaultEvents: false
});
<?php if ($it['it_use']) { ?>
var scroll_timeout = null;
var timeout = 200;
@ -512,6 +523,7 @@ $(function(){
$("#form_btn_layer").floatBottomMenu("show");
}, timeout);
});
<?php } ?>
// scroll event enable
$(window).on("movestart", function(e) {