관리 메뉴

I LOVE EJ

퀵메뉴 본문

Web publishing/JavaScript

퀵메뉴

BeOne 2009. 2. 24. 20:21

퀵메뉴 레이어의 좌우 정렬은 left:890px을 조정하시고 상하로의 정렬은 top:40px을 조정하세요

퀵메뉴 레이어의 크기는 width:96; height:600; 을 퀵메뉴용 이미지 quick.gif 크기에 맞춰 원하시는 크기로 조정하세요


<div id="floater" style="position:absolute; left:890px; top:40px;  width:96; height:600; z-index:1">
<table cellspacing="0" cellpadding="0">
 <tr>
  <td><img src="{{$template}}/img/plus/quick.gif" width="96" height="600" border="0" usemap="#quick"</td>
 </tr>
</table>
 
<script language="JavaScript">
<!--
self.onError=null;
currentX = currentY = 0;
whichIt = null;
lastScrollX = 0; lastScrollY = 0;
NS = (document.layers) ? 1 : 0;
IE = (document.all) ? 1: 0;

function heartBeat() {
 if(IE) {
  diffY = document.body.scrollTop;
  diffX = 0;
 }
 if(NS) { diffY = self.pageYOffset; diffX = self.pageXOffset; }
 if(diffY != lastScrollY) {
  percent = .1 * (diffY - lastScrollY);
  if(percent > 0) percent = Math.ceil(percent);
  else percent = Math.floor(percent);
 
  if(IE) document.all.floater.style.pixelTop += percent;
  if(NS) document.floater.top += percent;
  lastScrollY = lastScrollY + percent;
 }
 if(diffX != lastScrollX) {
  percent = .1 * (diffX - lastScrollX);
  if(percent > 0) percent = Math.ceil(percent);
  else percent = Math.floor(percent);
   
  if(IE) document.all.floater.style.pixelLeft += percent;
  if(NS) document.floater.top += percent;
  lastScrollY = lastScrollY + percent;
 }
}
if(NS || IE) action = window.setInterval("heartBeat()",1);
//-->
</script>
</div>