묻고답하기
page_full_width" class="col-xs-12" |cond="$__Context->page_full_width">
항상 따라다니느 메뉴 만들기.... (오류수정... )
2003.10.20 17:35
http://user.chollian.net/~silsira/cotext.htm<div align="center">
<input id="ANIMATE" type="checkbox" onclick="ToggleAnimate();">
따라다님 끄기 </div>
이걸 없에고 싶은데요. 단순히 이부분만 삭제하면 아에 되던거도 안되거든요.
메뉴 아래 "따라다님 끄기"를 없에려면 소스를 어떻게 수정해야할까요?
도움 부탁드립니다.
-------------------------------------------------
<script language="javascript">
<!--
var stmnLEFT = 0; // 스크롤메뉴의 좌측 위치
var stmnGAP1 = 134; // 페이지 헤더부분의 여백
var stmnGAP2 = 10; // 스크롤시 브라우저 상단과 약간 띄움. 필요없으면 0으로 세팅
var stmnBASE = 0; // 스크롤메뉴 초기 시작위치 (아무렇게나 해도 상관은 없지만 stmnGAP1과 약간 차이를 주는게 보기 좋음)
var stmnActivateSpeed = 200; // 움직임을 감지하는 속도 (숫자가 클수록 늦게 알아차림)
var stmnScrollSpeed = 10; // 스크롤되는 속도 (클수록 늦게 움직임)
var stmnTimer;
function ReadCookie(name) {
var label = name + "=";
var labelLen = label.length;
var cLen = document.cookie.length;
var i = 0;
while (i < cLen) {
var j = i + labelLen;
if (document.cookie.substring(i, j) == label) {
var cEnd = document.cookie.indexOf(";", j);
if (cEnd == -1) cEnd = document.cookie.length;
return unescape(document.cookie.substring(j, cEnd));
}
i++;
}
return "";
}
function SaveCookie(name, value, expire) {
var eDate = new Date();
eDate.setDate(eDate.getDate() + expire);
document.cookie = name + "=" + value + "; expires=" + eDate.toGMTString()+ "; path=/";
}
function RefreshStaticMenu() {
var stmnStartPoint, stmnEndPoint, stmnRefreshTimer;
stmnStartPoint = parseInt(STATICMENU.style.top, 10);
stmnEndPoint = document.body.scrollTop + stmnGAP2;
if (stmnEndPoint < stmnGAP1) stmnEndPoint = stmnGAP1;
stmnRefreshTimer = stmnActivateSpeed;
if ( stmnStartPoint != stmnEndPoint ) {
stmnScrollAmount = Math.ceil( Math.abs( stmnEndPoint - stmnStartPoint ) / 15 );
STATICMENU.style.top = parseInt(STATICMENU.style.top, 10) + ( ( stmnEndPoint<stmnStartPoint ) ? -stmnScrollAmount : stmnScrollAmount );
stmnRefreshTimer = stmnScrollSpeed;
}
stmnTimer = setTimeout ("RefreshStaticMenu();", stmnRefreshTimer);
}
function InitializeStaticMenu() {
STATICMENU.style.left = stmnLEFT;
if (ReadCookie("ANIMATE") == "false") {
ANIMATE.checked = true;
STATICMENU.style.top = document.body.scrollTop + stmnGAP1;
} else {
ANIMATE.checked = false;
STATICMENU.style.top = document.body.scrollTop + stmnBASE;
RefreshStaticMenu();
}
}
//-->
</script>
<div id="STATICMENU" style="position:absolute; width:100%; height:148px; left: 40px;">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td valign="top"><table width="100%" sborder="0" cellspacing="0" cellpadding="0">
<!--DWLayoutTable-->
<tr>
<td > </td>
<td width="165" height="100%" valign="top"><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="1" rowspan="3" ></td>
<td width="163" height="28"> </td>
<td width="1" rowspan="3" ></td>
</tr>
<tr>
<td valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td height="37" valign="top"><div align="right"><img src="/news/images/menu1_r.gif" width="138" height="37"></div></td>
</tr>
<tr>
<td height="37" valign="top"><div align="right"><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image1011','','/news/images/menu2_r.gif',1)"><img src="/news/images/menu2.gif" name="Image1011" width="138" height="37" border="0" id="Image101"></a></div></td>
</tr>
<tr>
<td height="37" valign="top"><div align="right"><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image1111','','/news/images/menu3_r.gif',1)"><img src="/news/images/menu3.gif" name="Image1111" width="138" height="37" border="0" id="Image111"></a></div></td>
</tr>
<tr>
<td width="163" height="37" valign="top"><div align="right"><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image1211','','/news/images/menu4_r.gif',1)"><img src="/news/images/menu4.gif" name="Image1211" width="138" height="37" border="0" id="Image121"></a></div></td>
</tr>
</table></td>
</tr>
<tr>
<td valign="bottom"><!--DWLayoutEmptyCell--> </td>
</tr>
</table></td>
<td width="615" valign="top"><!--DWLayoutEmptyCell--> </td>
<td> </td>
</tr>
<tr>
<td > </td>
<td height="100%" valign="top"> <div align="center">
<input id="ANIMATE" type="checkbox" onclick="ToggleAnimate();">
따라다님 끄기 </div></td>
<td valign="top"><!--DWLayoutEmptyCell--> </td>
<td> </td>
</tr>
</table></td>
</tr>
<tr>
<td align="left" height="20"></td>
</tr>
</table>
</div>
<script language="javascript">
<!--
InitializeStaticMenu(); // 스크롤메뉴를 가동하는 자바스크립트
//-->
</script>
<input id="ANIMATE" type="checkbox" onclick="ToggleAnimate();">
따라다님 끄기 </div>
이걸 없에고 싶은데요. 단순히 이부분만 삭제하면 아에 되던거도 안되거든요.
메뉴 아래 "따라다님 끄기"를 없에려면 소스를 어떻게 수정해야할까요?
도움 부탁드립니다.
-------------------------------------------------
<script language="javascript">
<!--
var stmnLEFT = 0; // 스크롤메뉴의 좌측 위치
var stmnGAP1 = 134; // 페이지 헤더부분의 여백
var stmnGAP2 = 10; // 스크롤시 브라우저 상단과 약간 띄움. 필요없으면 0으로 세팅
var stmnBASE = 0; // 스크롤메뉴 초기 시작위치 (아무렇게나 해도 상관은 없지만 stmnGAP1과 약간 차이를 주는게 보기 좋음)
var stmnActivateSpeed = 200; // 움직임을 감지하는 속도 (숫자가 클수록 늦게 알아차림)
var stmnScrollSpeed = 10; // 스크롤되는 속도 (클수록 늦게 움직임)
var stmnTimer;
function ReadCookie(name) {
var label = name + "=";
var labelLen = label.length;
var cLen = document.cookie.length;
var i = 0;
while (i < cLen) {
var j = i + labelLen;
if (document.cookie.substring(i, j) == label) {
var cEnd = document.cookie.indexOf(";", j);
if (cEnd == -1) cEnd = document.cookie.length;
return unescape(document.cookie.substring(j, cEnd));
}
i++;
}
return "";
}
function SaveCookie(name, value, expire) {
var eDate = new Date();
eDate.setDate(eDate.getDate() + expire);
document.cookie = name + "=" + value + "; expires=" + eDate.toGMTString()+ "; path=/";
}
function RefreshStaticMenu() {
var stmnStartPoint, stmnEndPoint, stmnRefreshTimer;
stmnStartPoint = parseInt(STATICMENU.style.top, 10);
stmnEndPoint = document.body.scrollTop + stmnGAP2;
if (stmnEndPoint < stmnGAP1) stmnEndPoint = stmnGAP1;
stmnRefreshTimer = stmnActivateSpeed;
if ( stmnStartPoint != stmnEndPoint ) {
stmnScrollAmount = Math.ceil( Math.abs( stmnEndPoint - stmnStartPoint ) / 15 );
STATICMENU.style.top = parseInt(STATICMENU.style.top, 10) + ( ( stmnEndPoint<stmnStartPoint ) ? -stmnScrollAmount : stmnScrollAmount );
stmnRefreshTimer = stmnScrollSpeed;
}
stmnTimer = setTimeout ("RefreshStaticMenu();", stmnRefreshTimer);
}
function InitializeStaticMenu() {
STATICMENU.style.left = stmnLEFT;
if (ReadCookie("ANIMATE") == "false") {
ANIMATE.checked = true;
STATICMENU.style.top = document.body.scrollTop + stmnGAP1;
} else {
ANIMATE.checked = false;
STATICMENU.style.top = document.body.scrollTop + stmnBASE;
RefreshStaticMenu();
}
}
//-->
</script>
<div id="STATICMENU" style="position:absolute; width:100%; height:148px; left: 40px;">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td valign="top"><table width="100%" sborder="0" cellspacing="0" cellpadding="0">
<!--DWLayoutTable-->
<tr>
<td > </td>
<td width="165" height="100%" valign="top"><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="1" rowspan="3" ></td>
<td width="163" height="28"> </td>
<td width="1" rowspan="3" ></td>
</tr>
<tr>
<td valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td height="37" valign="top"><div align="right"><img src="/news/images/menu1_r.gif" width="138" height="37"></div></td>
</tr>
<tr>
<td height="37" valign="top"><div align="right"><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image1011','','/news/images/menu2_r.gif',1)"><img src="/news/images/menu2.gif" name="Image1011" width="138" height="37" border="0" id="Image101"></a></div></td>
</tr>
<tr>
<td height="37" valign="top"><div align="right"><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image1111','','/news/images/menu3_r.gif',1)"><img src="/news/images/menu3.gif" name="Image1111" width="138" height="37" border="0" id="Image111"></a></div></td>
</tr>
<tr>
<td width="163" height="37" valign="top"><div align="right"><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image1211','','/news/images/menu4_r.gif',1)"><img src="/news/images/menu4.gif" name="Image1211" width="138" height="37" border="0" id="Image121"></a></div></td>
</tr>
</table></td>
</tr>
<tr>
<td valign="bottom"><!--DWLayoutEmptyCell--> </td>
</tr>
</table></td>
<td width="615" valign="top"><!--DWLayoutEmptyCell--> </td>
<td> </td>
</tr>
<tr>
<td > </td>
<td height="100%" valign="top"> <div align="center">
<input id="ANIMATE" type="checkbox" onclick="ToggleAnimate();">
따라다님 끄기 </div></td>
<td valign="top"><!--DWLayoutEmptyCell--> </td>
<td> </td>
</tr>
</table></td>
</tr>
<tr>
<td align="left" height="20"></td>
</tr>
</table>
</div>
<script language="javascript">
<!--
InitializeStaticMenu(); // 스크롤메뉴를 가동하는 자바스크립트
//-->
</script>
http://www.nzeo.com/bbs/zboard.php?id=p_javascript&no=157
자바스크립트 게시판에 찾아보시면 비슷한 기능을 하는 다른 분들의 소스도 있구요.
아래껀 어렵다면 어렵고 쉽다면 쉬운 HTC 버전용 움직이는 레이어입니다 (기능은 같습니다)
http://steelheart.pe.kr/bbs/zboard.php?id=temp&no=6