지구인

간단한 퀵메뉴

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

그누에 적용하시려면 아래 소스를 따로 /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,088
19년 전 조회 7,185
19년 전 조회 2,681
19년 전 조회 2,900
19년 전 조회 4,383
19년 전 조회 2,371
19년 전 조회 3,799
19년 전 조회 3,088
19년 전 조회 2,933
19년 전 조회 2,401
19년 전 조회 2,687
19년 전 조회 2,784
19년 전 조회 3,286
19년 전 조회 3,955
19년 전 조회 3,467
19년 전 조회 2,990
19년 전 조회 2,485
19년 전 조회 3,140
19년 전 조회 3,246
19년 전 조회 2,777
19년 전 조회 2,496
19년 전 조회 3,526
19년 전 조회 5,070
19년 전 조회 5,275
19년 전 조회 2,508
19년 전 조회 2,392
19년 전 조회 5,189
19년 전 조회 9,189
19년 전 조회 2,255
19년 전 조회 5,133
19년 전 조회 4,574
19년 전 조회 2,825
19년 전 조회 5,182
19년 전 조회 3,010
19년 전 조회 3,893
19년 전 조회 2,825
19년 전 조회 3,642
19년 전 조회 2,169
19년 전 조회 5,583
19년 전 조회 1,930
19년 전 조회 6,279
19년 전 조회 3,092
19년 전 조회 6,256
19년 전 조회 7,034
19년 전 조회 3,944
19년 전 조회 2,422
19년 전 조회 2,306
19년 전 조회 7,096
19년 전 조회 2,602
19년 전 조회 4,154
19년 전 조회 5,545
19년 전 조회 2,882
19년 전 조회 1,921
19년 전 조회 1,771
19년 전 조회 1,722
19년 전 조회 1,997
19년 전 조회 2,012
19년 전 조회 1,995
19년 전 조회 1,919
19년 전 조회 2,713
19년 전 조회 2,532
19년 전 조회 3,671
19년 전 조회 2,799
19년 전 조회 2,769
19년 전 조회 3,612
19년 전 조회 4,827
19년 전 조회 3,169
19년 전 조회 3,014
19년 전 조회 3,560
19년 전 조회 6,486
19년 전 조회 2,401
19년 전 조회 2,204
19년 전 조회 2,161
19년 전 조회 2,217
19년 전 조회 3,390
19년 전 조회 2,461
19년 전 조회 2,140
19년 전 조회 1,844
19년 전 조회 2,295
19년 전 조회 3,571
19년 전 조회 3,431
19년 전 조회 2,132
19년 전 조회 1,691
19년 전 조회 3,379
19년 전 조회 2,249
19년 전 조회 1,826
19년 전 조회 3,045
19년 전 조회 2,172
19년 전 조회 2,052
19년 전 조회 2,026
19년 전 조회 1,984
19년 전 조회 2,410
19년 전 조회 2,836
19년 전 조회 1,985
19년 전 조회 1,729
19년 전 조회 1,732
19년 전 조회 1,690
19년 전 조회 3,421
19년 전 조회 3,113
19년 전 조회 1,859