지구인

간단한 퀵메뉴

· 19년 전 · 3996
퀵메뉴 관련소스 중에 비교적 간단해서 자주 애용하는 소스입니다. (중복일지도;;)
근데 아쉽게도 파폭에선 안되네요... 그동안 잘 안 쓴 이유도 그때문인데 그럼에도 불구하고 오늘 어떤 사이트에 적용했다가 (찾아보니 다른건 거의 플래시용이라) 팁으로도 올립니다.

그누에 적용하시려면 아래 소스를 따로 /g4/js/qmenu.js 등의 이름으로 저장한 다음
head.sub.php에서

<script language="javascript" src="<?=$g4['path']?>/js/common.js"></script>
<script language="javascript" src="<?=$g4['path']?>/js/ajax.js"></script>
<script language="javascript" src="<?=$g4['path']?>/js/qmenu.js"></script>
<body topmargin="0" leftmargin="0" <?=isset($g4['body_script']) ? $g4['body_script'] : "";?>>
<a name="g4_head"></a>

이런 식으로 추가해주면 됩니다.


///////////////여기부터 퀵메뉴 소스
document.write('<div id=floater style=\"position:absolute; left:1000px; top:300px; z-index:100;\">');
document.write('<a href=\"#g4_head\" onfocus="this.blur()">Top</a><br>');
document.write('<a href=\"javascript:history.go(-1)\" onfocus="this.blur()">Back</a></div>');

self.onError=null;
currentX = currentY = 0;
whichIt = null;
lastScrollX = 0; lastScrollY = 0;
NS = (document.layers) ? 1 : 0;
IE = (document.all) ? 1: 0;
<!-- STALKER CODE -->
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);
////////////여기까지<div class='small'>[이 게시물은 관리자님에 의해 2011-10-31 16:57:14 JavaScript에서 이동 됨]</div>
|
댓글을 작성하시려면 로그인이 필요합니다.

프로그램

+
제목 글쓴이 날짜 조회
19년 전 조회 5,961
19년 전 조회 7,041
19년 전 조회 2,537
19년 전 조회 2,764
19년 전 조회 4,231
19년 전 조회 2,220
19년 전 조회 3,672
19년 전 조회 2,945
19년 전 조회 2,786
19년 전 조회 2,256
19년 전 조회 2,536
19년 전 조회 2,650
19년 전 조회 3,131
19년 전 조회 3,812
19년 전 조회 3,332
19년 전 조회 2,845
19년 전 조회 2,328
19년 전 조회 3,004
19년 전 조회 3,103
19년 전 조회 2,607
19년 전 조회 2,356
19년 전 조회 3,380
19년 전 조회 4,925
19년 전 조회 5,120
19년 전 조회 2,342
19년 전 조회 2,233
19년 전 조회 5,038
19년 전 조회 9,013
19년 전 조회 2,096
19년 전 조회 4,976
19년 전 조회 4,411
19년 전 조회 2,679
19년 전 조회 5,016
19년 전 조회 2,844
19년 전 조회 3,726
19년 전 조회 2,666
19년 전 조회 3,480
19년 전 조회 2,005
19년 전 조회 5,431
19년 전 조회 1,761
19년 전 조회 6,123
19년 전 조회 2,924
19년 전 조회 6,110
19년 전 조회 6,881
19년 전 조회 3,781
19년 전 조회 2,257
19년 전 조회 2,153
19년 전 조회 6,953
19년 전 조회 2,448
19년 전 조회 3,997
19년 전 조회 5,404
19년 전 조회 2,728
19년 전 조회 1,773
19년 전 조회 1,620
19년 전 조회 1,562
19년 전 조회 1,842
19년 전 조회 1,859
19년 전 조회 1,851
19년 전 조회 1,762
19년 전 조회 2,556
19년 전 조회 2,363
19년 전 조회 3,527
19년 전 조회 2,651
19년 전 조회 2,624
19년 전 조회 3,457
19년 전 조회 4,683
19년 전 조회 3,033
19년 전 조회 2,858
19년 전 조회 3,397
19년 전 조회 6,346
19년 전 조회 2,249
19년 전 조회 2,054
19년 전 조회 2,019
19년 전 조회 2,060
19년 전 조회 3,246
19년 전 조회 2,317
19년 전 조회 2,006
19년 전 조회 1,690
19년 전 조회 2,156
19년 전 조회 3,429
19년 전 조회 3,280
19년 전 조회 1,978
19년 전 조회 1,550
19년 전 조회 3,231
19년 전 조회 2,106
19년 전 조회 1,666
19년 전 조회 2,895
19년 전 조회 2,024
19년 전 조회 1,919
19년 전 조회 1,875
19년 전 조회 1,829
19년 전 조회 2,270
19년 전 조회 2,680
19년 전 조회 1,842
19년 전 조회 1,579
19년 전 조회 1,588
19년 전 조회 1,541
19년 전 조회 3,273
19년 전 조회 2,971
19년 전 조회 1,719