지구인

간단한 퀵메뉴

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

그누에 적용하시려면 아래 소스를 따로 /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>
|
댓글을 작성하시려면 로그인이 필요합니다. 로그인

프로그램

+
제목 글쓴이 날짜 조회
18년 전 조회 5,890
18년 전 조회 6,985
18년 전 조회 2,468
18년 전 조회 2,711
18년 전 조회 4,167
18년 전 조회 2,172
18년 전 조회 3,618
18년 전 조회 2,874
18년 전 조회 2,731
18년 전 조회 2,201
18년 전 조회 2,464
18년 전 조회 2,593
18년 전 조회 3,088
18년 전 조회 3,733
18년 전 조회 3,273
18년 전 조회 2,779
18년 전 조회 2,272
18년 전 조회 2,940
18년 전 조회 3,030
18년 전 조회 2,541
18년 전 조회 2,298
18년 전 조회 3,331
18년 전 조회 4,850
18년 전 조회 5,068
18년 전 조회 2,294
18년 전 조회 2,186
18년 전 조회 4,995
18년 전 조회 8,960
18년 전 조회 2,046
18년 전 조회 4,924
19년 전 조회 4,363
19년 전 조회 2,605
19년 전 조회 4,961
19년 전 조회 2,788
19년 전 조회 3,667
19년 전 조회 2,620
19년 전 조회 3,433
19년 전 조회 1,944
19년 전 조회 5,376
19년 전 조회 1,694
19년 전 조회 6,052
19년 전 조회 2,871
19년 전 조회 6,036
19년 전 조회 6,831
19년 전 조회 3,723
19년 전 조회 2,204
19년 전 조회 2,098
19년 전 조회 6,895
19년 전 조회 2,395
19년 전 조회 3,949
19년 전 조회 5,334
19년 전 조회 2,680
19년 전 조회 1,734
19년 전 조회 1,573
19년 전 조회 1,517
19년 전 조회 1,794
19년 전 조회 1,786
19년 전 조회 1,779
19년 전 조회 1,717
19년 전 조회 2,506
19년 전 조회 2,310
19년 전 조회 3,467
19년 전 조회 2,593
19년 전 조회 2,573
19년 전 조회 3,414
19년 전 조회 4,627
19년 전 조회 2,964
19년 전 조회 2,802
19년 전 조회 3,348
19년 전 조회 6,281
19년 전 조회 2,184
19년 전 조회 1,990
19년 전 조회 1,941
19년 전 조회 2,001
19년 전 조회 3,191
19년 전 조회 2,261
19년 전 조회 1,950
19년 전 조회 1,626
19년 전 조회 2,076
19년 전 조회 3,361
19년 전 조회 3,228
19년 전 조회 1,907
19년 전 조회 1,480
19년 전 조회 3,176
19년 전 조회 2,052
19년 전 조회 1,617
19년 전 조회 2,836
19년 전 조회 1,966
19년 전 조회 1,840
19년 전 조회 1,813
19년 전 조회 1,780
19년 전 조회 2,204
19년 전 조회 2,623
19년 전 조회 1,782
19년 전 조회 1,520
19년 전 조회 1,531
19년 전 조회 1,459
19년 전 조회 3,223
19년 전 조회 2,912
19년 전 조회 1,669
🐛 버그신고