상품상세 슬라이드 반응성 개선
This commit is contained in:
@ -257,7 +257,7 @@
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
threshold: 100,
|
threshold: 70,
|
||||||
excludedElements:"button, input, select, textarea, .noSwipe",
|
excludedElements:"button, input, select, textarea, .noSwipe",
|
||||||
allowPageScroll:"vertical"
|
allowPageScroll:"vertical"
|
||||||
});
|
});
|
||||||
|
|||||||
@ -97,7 +97,7 @@ switch($info) {
|
|||||||
<div id="menu_button" class="menu_hidden">
|
<div id="menu_button" class="menu_hidden">
|
||||||
<button type="button">메뉴열기</button>
|
<button type="button">메뉴열기</button>
|
||||||
</div>
|
</div>
|
||||||
<div id="menu_list" class="menu_hidden">
|
<div id="menu_list">
|
||||||
<?php echo pg_anchor($info); ?>
|
<?php echo pg_anchor($info); ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@ -377,7 +377,7 @@ $(function(){
|
|||||||
|
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
threshold: 100,
|
threshold: 70,
|
||||||
excludedElements:"button, input, select, textarea, .noSwipe",
|
excludedElements:"button, input, select, textarea, .noSwipe",
|
||||||
allowPageScroll:"vertical"
|
allowPageScroll:"vertical"
|
||||||
};
|
};
|
||||||
@ -387,57 +387,59 @@ $(function(){
|
|||||||
|
|
||||||
function content_slide(direction)
|
function content_slide(direction)
|
||||||
{
|
{
|
||||||
var content = $("#container").clone()
|
|
||||||
.find("#form_btn_layer").remove()
|
|
||||||
.end().find(".sit_pvi_btn").remove()
|
|
||||||
.end().html();
|
|
||||||
var pos = $("#container").position();
|
|
||||||
var width = $("#container").width();
|
|
||||||
var height = $("#container").height();
|
|
||||||
var pad_top = $("#container").css("padding-top");
|
|
||||||
var next_href = '<?php echo $next_href; ?>';
|
|
||||||
var prev_href = '<?php echo $prev_href; ?>';
|
|
||||||
var str, left_value;
|
|
||||||
var duration = 500;
|
|
||||||
|
|
||||||
if(direction == "left") {
|
|
||||||
str = next_href;
|
|
||||||
left_value = "-="+width+"px";
|
|
||||||
} else {
|
|
||||||
str = prev_href;
|
|
||||||
left_value = "+="+width+"px";
|
|
||||||
}
|
|
||||||
|
|
||||||
// 로딩 레이어
|
// 로딩 레이어
|
||||||
load_message();
|
load_message();
|
||||||
|
|
||||||
$("#container")
|
setTimeout(function() {
|
||||||
.css({
|
var content = $("#container").clone()
|
||||||
width: width+"px",
|
.find("#form_btn_layer").remove()
|
||||||
height: height+"px"
|
.end().find(".sit_pvi_btn").remove()
|
||||||
})
|
.end().html();
|
||||||
.before("<div id=\"container_clone\">"+content+"</div>")
|
var pos = $("#container").position();
|
||||||
.find("*:visible").hide();
|
var width = $("#container").width();
|
||||||
|
var height = $("#container").height();
|
||||||
|
var pad_top = $("#container").css("padding-top");
|
||||||
|
var next_href = '<?php echo $next_href; ?>';
|
||||||
|
var prev_href = '<?php echo $prev_href; ?>';
|
||||||
|
var str, left_value;
|
||||||
|
var duration = 500;
|
||||||
|
|
||||||
$("#container_clone")
|
if(direction == "left") {
|
||||||
.css({
|
str = next_href;
|
||||||
display: "block",
|
left_value = "-="+width+"px";
|
||||||
width: width+"px",
|
} else {
|
||||||
height: height+"px",
|
str = prev_href;
|
||||||
position: "absolute",
|
left_value = "+="+width+"px";
|
||||||
top: pos.top+"px",
|
}
|
||||||
left: pos.left+"px",
|
|
||||||
zIndex: "1000",
|
$("#container")
|
||||||
paddingTop: pad_top
|
.css({
|
||||||
})
|
width: width+"px",
|
||||||
.animate(
|
height: height+"px"
|
||||||
{ left: left_value }, duration,
|
})
|
||||||
function() {
|
.before("<div id=\"container_clone\">"+content+"</div>")
|
||||||
$("#container_clone").remove();
|
.find("*:visible").hide();
|
||||||
var href = str.match(/https?:\/{2}[^\"]+/gi);
|
|
||||||
document.location.href = href[0];
|
$("#container_clone")
|
||||||
}
|
.css({
|
||||||
);
|
display: "block",
|
||||||
|
width: width+"px",
|
||||||
|
height: height+"px",
|
||||||
|
position: "absolute",
|
||||||
|
top: pos.top+"px",
|
||||||
|
left: pos.left+"px",
|
||||||
|
zIndex: "1000",
|
||||||
|
paddingTop: pad_top
|
||||||
|
})
|
||||||
|
.animate(
|
||||||
|
{ left: left_value }, duration,
|
||||||
|
function() {
|
||||||
|
$("#container_clone").remove();
|
||||||
|
var href = str.match(/https?:\/{2}[^\"]+/gi);
|
||||||
|
document.location.href = href[0];
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}, 100);
|
||||||
}
|
}
|
||||||
|
|
||||||
function load_message()
|
function load_message()
|
||||||
|
|||||||
Reference in New Issue
Block a user