지구인

간단한 퀵메뉴

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

그누에 적용하시려면 아래 소스를 따로 /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년 전 조회 6,044
19년 전 조회 7,139
19년 전 조회 2,620
19년 전 조회 2,852
19년 전 조회 4,332
19년 전 조회 2,315
19년 전 조회 3,752
19년 전 조회 3,034
19년 전 조회 2,875
19년 전 조회 2,349
19년 전 조회 2,631
19년 전 조회 2,734
19년 전 조회 3,233
19년 전 조회 3,896
19년 전 조회 3,410
19년 전 조회 2,935
19년 전 조회 2,431
19년 전 조회 3,089
19년 전 조회 3,194
19년 전 조회 2,715
19년 전 조회 2,440
19년 전 조회 3,475
19년 전 조회 5,012
19년 전 조회 5,219
19년 전 조회 2,451
19년 전 조회 2,336
19년 전 조회 5,134
19년 전 조회 9,123
19년 전 조회 2,201
19년 전 조회 5,078
19년 전 조회 4,519
19년 전 조회 2,774
19년 전 조회 5,128
19년 전 조회 2,948
19년 전 조회 3,833
19년 전 조회 2,766
19년 전 조회 3,585
19년 전 조회 2,111
19년 전 조회 5,528
19년 전 조회 1,870
19년 전 조회 6,222
19년 전 조회 3,037
19년 전 조회 6,204
19년 전 조회 6,982
19년 전 조회 3,887
19년 전 조회 2,361
19년 전 조회 2,248
19년 전 조회 7,042
19년 전 조회 2,535
19년 전 조회 4,096
19년 전 조회 5,490
19년 전 조회 2,818
19년 전 조회 1,867
19년 전 조회 1,715
19년 전 조회 1,668
19년 전 조회 1,942
19년 전 조회 1,947
19년 전 조회 1,938
19년 전 조회 1,858
19년 전 조회 2,659
19년 전 조회 2,474
19년 전 조회 3,614
19년 전 조회 2,739
19년 전 조회 2,719
19년 전 조회 3,557
19년 전 조회 4,768
19년 전 조회 3,117
19년 전 조회 2,950
19년 전 조회 3,502
19년 전 조회 6,429
19년 전 조회 2,344
19년 전 조회 2,147
19년 전 조회 2,108
19년 전 조회 2,155
19년 전 조회 3,335
19년 전 조회 2,408
19년 전 조회 2,085
19년 전 조회 1,788
19년 전 조회 2,237
19년 전 조회 3,513
19년 전 조회 3,364
19년 전 조회 2,074
19년 전 조회 1,638
19년 전 조회 3,317
19년 전 조회 2,204
19년 전 조회 1,760
19년 전 조회 2,986
19년 전 조회 2,121
19년 전 조회 1,993
19년 전 조회 1,966
19년 전 조회 1,925
19년 전 조회 2,356
19년 전 조회 2,775
19년 전 조회 1,923
19년 전 조회 1,678
19년 전 조회 1,677
19년 전 조회 1,636
19년 전 조회 3,359
19년 전 조회 3,061
19년 전 조회 1,800