모바일 플로팅 메뉴 스크립트 수정

This commit is contained in:
chicpro
2013-10-17 17:38:15 +09:00
parent c3eeade1ff
commit 000e5f7c76
5 changed files with 183 additions and 230 deletions

View File

@ -101,7 +101,39 @@ switch($info) {
<script>
$(function() {
$("#info_top_layer").topFloatMenu();
var scroll_timeout = null;
var timeout = 200;
$(window).on("load", function(e) {
setTimeout(function() {
$("#info_top_layer").floatTopMenu();
}, timeout);
});
if(navigator.userAgent.toLowerCase().indexOf("android") > -1) {
$(window).on("resize", function(e) {
setTimeout(function() {
$(window).trigger("scroll");
}, timeout);
});
}
$(window).on("scroll", function(e) {
clearTimeout(scroll_timeout);
$("#info_top_layer").floatTopMenu("hide");
scroll_timeout = setTimeout(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>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

@ -385,9 +385,6 @@ $(function(){
return false;
});
// 하단 플로팅 메뉴
$("#form_btn_layer").bottomFloatMenu();
// 이전 다음상품 swipe
$(window)
.on("swipeleft", function(e) {
@ -490,6 +487,32 @@ $(function(){
<?php } ?>
});
var scroll_timeout = null;
var timeout = 200;
$(window).on("load", function(e) {
setTimeout(function() {
$("#form_btn_layer").floatBottomMenu();
}, timeout);
});
if(navigator.userAgent.toLowerCase().indexOf("android") > -1) {
$(window).on("resize", function(e) {
setTimeout(function() {
$(window).trigger("scroll");
}, timeout);
});
}
$(window).on("scroll", function(e) {
clearTimeout(scroll_timeout);
$("#form_btn_layer").floatBottomMenu("hide");
scroll_timeout = setTimeout(function() {
$("#form_btn_layer").floatBottomMenu("show");
}, timeout);
});
// scroll event enable
$(window).on("movestart", function(e) {
if ((e.distX > e.distY && e.distX < -e.distY) ||
@ -503,11 +526,16 @@ function load_message()
{
var w = $(window).width();
var h = $(window).height();
var img_w = 32;
var img_h = 32;
var img_w = 64;
var img_h = 64;
var top, left;
var scr_top = $(window).scrollTop();
if (/iP(hone|od|ad)/.test(navigator.platform)) {
if(window.innerHeight - $(window).outerHeight(true) > 0)
h += (window.innerHeight - $(window).outerHeight(true));
}
top = parseInt((h - img_h) / 2);
left = parseInt((w - img_w) / 2);

View File

@ -80,5 +80,5 @@
/* 로딩안내 레이어 */
#loading_message {position:absolute;top:0;left:0;z-index:10000;background-color:#000;opacity:.5}
#loading_message img {position:relative}
#loading_message {position:absolute;top:0;left:0;z-index:10000;background-color:#eee;opacity:0.5}
#loading_message img {position:relative;opacity:1.0}