모바일 플로팅 메뉴 스크립트 추가

This commit is contained in:
chicpro
2013-09-27 17:53:49 +09:00
parent 21ea906b81
commit 16fdd3d4e0
16 changed files with 216 additions and 74 deletions

View File

@ -7,9 +7,6 @@ include_once(G5_LIB_PATH.'/iteminfo.lib.php');
<link rel="stylesheet" href="<?php echo G5_MSHOP_SKIN_URL; ?>/style.css">
<section id="sit_inf">
<h2>상품 정보</h2>
<?php echo pg_anchor($info); ?>
<?php if ($it['it_basic']) { // 상품 기본설명 ?>
<div id="sit_inf_basic">
<?php echo $it['it_basic']; ?>
@ -52,49 +49,4 @@ include_once(G5_LIB_PATH.'/iteminfo.lib.php');
<?php } //if?>
</section>
<!-- 상품설명 end -->
<!--[if lte IE 6]>
<script>
// 이미지 등비율 리사이징
$(window).load(function() {
view_image_resize();
});
function view_image_resize()
{
var $img = $("#sit_inf_explan img");
var img_wrap = $("#sit_inf_explan").width();
var win_width = $(window).width() - 35;
var res_width = 0;
if(img_wrap < win_width)
res_width = img_wrap;
else
res_width = win_width;
$img.each(function() {
var img_width = $(this).width();
var img_height = $(this).height();
var this_width = $(this).data("width");
var this_height = $(this).data("height");
if(this_width == undefined) {
$(this).data("width", img_width); // 원래 이미지 사이즈
$(this).data("height", img_height);
this_width = img_width;
this_height = img_height;
}
if(this_width > res_width) {
$(this).width(res_width);
var res_height = Math.round(res_width * $(this).data("height") / $(this).data("width"));
$(this).height(res_height);
} else {
$(this).width(this_width);
$(this).height(this_height);
}
});
}
</script>
<![endif]-->
<!-- 상품설명 end -->