컨텐츠 바로가기


스마트디자인 팁 상세
제목 [스마트디자인] 주소 입력시 나머지주소 입력박스에 도움말 띄우기 - 모바일
작성자 대표 관리자 (ip:) 작성일 2016-05-24 13:14:40 조회수 1431

주소 입력시 나머지주소 입력박스에 도움말 띄우기 - 모바일




쇼핑몰을 이용하는 사용자들이 주문서작성/회원가입 페이지에서 주소를 입력할 때
나머지주소를 쓰는것을 잊어 기입하지 않는 경우가 있습니다.





이를 방지하기 위해 나머지주소로 커서가 이동되었을때 도움말을 띄워 알리는 방법을
모바일화면에 적용해보도록 하겠습니다.




 1. 모바일쇼핑몰 > 스마트디자인 편집창으로 회원가입(/member/join.html) 페이지를 열어주세요.

나머지주소 입력박스를 출력해주는 {$form.addr2}변수에 아래와 같이 도움말 소스를 추가합니다.


<div class="ec-base-tooltip"> <span id="{$name_contents}" class="eTip">{$form.addr2}</span> <div class="tooltip"> <div class="content"> 나머지주소가 있는경우, <br>나머지주소를 모두 입력하세요. <button type="button" class="close eClose">닫기</button> </div> </div> </div>

 



2. /css/module/member/join.css에 도움말 관련 CSS를 추가합니다.


.ec-base-tooltip { position:relative; display:inline-block; width:100%; vertical-align:top; }
.ec-base-tooltip h3 { font-size:15px; color:#000; font-weight:bold; line-height:43px; }
.ec-base-tooltip ul li { font-size:13px; }
.ec-base-tooltip .tooltip { width:200px; display:none; position:absolute; left:-65px; bottom:40px; padding:14px 28px 14px 14px; text-align:left; letter-spacing:normal; border:1px solid #ccc; background-color:#fff; border-radius:2px;
 -webkit-box-shadow: 3px 3px 3px 0px rgba(0,0,0,0.15);
 -moz-box-shadow: 3px 3px 3px 0px rgba(0,0,0,0.15);
 box-shadow: 3px 3px 3px 0px rgba(0,0,0,0.15); }
.ec-base-tooltip .tooltip:before { content:""; position:absolute; left:40%; bottom:-5px; display:inline-block; width:0; height:0; margin:-3px 0 0; border-left:5px solid transparent; border-top:5px solid #ccc; border-right:5px solid transparent; }
.ec-base-tooltip .tooltip:after {content:""; position:absolute; left:40%; bottom:-4px; display:inline-block; width:0; height:0; margin:-3px 0 0; border-left:5px solid transparent; border-top:5px solid #fff; border-right:5px solid transparent; }
.ec-base-tooltip .tooltip .txtWarn { color:#f65b54; }
.ec-base-tooltip .tooltip .close { position:absolute; right:7px; top:14px; overflow:hidden; width:14px; height:14px; margin:0; text-indent:150%; white-space:nowrap; background:url("http://img.echosting.cafe24.com/skin/mobile_ko_KR/layout/ico_close_gray.png") no-repeat; background-size:14px 14px; border:0; letter-spacing:normal; word-spacing:normal; text-transform:none; white-space:nowrap; }
.ec-base-tooltip.show { z-index:80; }


주문서작성 페이지에 적용시 아래 CSS를 참고하세요.


.xans-order-form .boardWrite .ec-base-tooltip { position:relative; display:inline-block; width:100%; vertical-align:top; }
.xans-order-form .boardWrite .ec-base-tooltip h3 { font-size:15px; color:#000; font-weight:bold; line-height:43px; }
.xans-order-form .boardWrite .ec-base-tooltip ul li { font-size:13px; }
.xans-order-form .boardWrite .ec-base-tooltip .tooltip { width:200px; display:none; position:absolute; left:-65px; bottom:40px; top:auto; padding:14px 28px 14px 14px; text-align:left; letter-spacing:normal; border:1px solid #ccc; background-color:#fff; border-radius:2px;
 -webkit-box-shadow: 3px 3px 3px 0px rgba(0,0,0,0.15);
 -moz-box-shadow: 3px 3px 3px 0px rgba(0,0,0,0.15);
 box-shadow: 3px 3px 3px 0px rgba(0,0,0,0.15); }
.xans-order-form .boardWrite .ec-base-tooltip .tooltip:before { content:""; position:absolute; left:40%; bottom:-5px; display:inline-block; width:0; height:0; margin:-3px 0 0; border-left:5px solid transparent; border-top:5px solid #ccc; border-right:5px solid transparent; }
.xans-order-form .boardWrite .ec-base-tooltip .tooltip:after {content:""; position:absolute; left:40%; bottom:-4px; display:inline-block; width:0; height:0; margin:-3px 0 0; border-left:5px solid transparent; border-top:5px solid #fff; border-right:5px solid transparent; }
.xans-order-form .boardWrite .ec-base-tooltip .tooltip .txtWarn { color:#f65b54; }
.xans-order-form .boardWrite .ec-base-tooltip .tooltip .close { position:absolute; right:7px; top:14px; overflow:hidden; width:14px; height:14px; margin:0; text-indent:150%; white-space:nowrap; background:url("http://img.echosting.cafe24.com/skin/mobile_ko_KR/layout/ico_close_gray.png") no-repeat; background-size:14px 14px; border:0; letter-spacing:normal; word-spacing:normal; text-transform:none; white-space:nowrap; }
.xans-order-form .boardWrite .ec-base-tooltip.show { z-index:80; }



 



3. /js/module/member/join.js도움말을 띄우는 자바스크립트 코드를 추가합니다.

주문서작성 페이지 적용할 경우에는 /js/module/order/order_form.js 에 추가합니다.


// 도움말 툴팁 $('body').delegate('.ec-base-tooltip .eTip', 'click', function(e){ var findTarget = $($(this).siblings('.tooltip')); var findTooltip = $('.tooltip'); $('.ec-base-tooltip').removeClass('show'); $(this).parents('.ec-base-tooltip:first').addClass('show'); findTooltip.hide(); findTarget.show(); e.preventDefault(); }); $('body').delegate('.ec-base-tooltip .eClose', 'click', function(e){ var findTarget = $(this).parents('.tooltip:first'); $('.ec-base-tooltip').removeClass('show'); findTarget.hide(); e.preventDefault(); });

 





-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



우편번호를 입력하고 나머지주소로 커서가 이동하면 자동으로 도움말을 띄우게 됩니다.
주문서작성 페이지에도 동일한 방법으로 적용할수 있습니다.









첨부파일
목록 관리자게시 삭제 수정