지구인

간단한 퀵메뉴

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

그누에 적용하시려면 아래 소스를 따로 /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,892
18년 전 조회 6,989
18년 전 조회 2,469
18년 전 조회 2,712
18년 전 조회 4,170
18년 전 조회 2,174
18년 전 조회 3,620
18년 전 조회 2,876
18년 전 조회 2,735
18년 전 조회 2,201
18년 전 조회 2,466
18년 전 조회 2,593
18년 전 조회 3,090
18년 전 조회 3,735
18년 전 조회 3,273
18년 전 조회 2,781
18년 전 조회 2,275
18년 전 조회 2,943
18년 전 조회 3,033
18년 전 조회 2,544
18년 전 조회 2,299
18년 전 조회 3,331
19년 전 조회 4,853
19년 전 조회 5,071
19년 전 조회 2,295
19년 전 조회 2,188
19년 전 조회 4,996
19년 전 조회 8,963
19년 전 조회 2,046
19년 전 조회 4,924
19년 전 조회 4,364
19년 전 조회 2,607
19년 전 조회 4,962
19년 전 조회 2,790
19년 전 조회 3,670
19년 전 조회 2,620
19년 전 조회 3,434
19년 전 조회 1,945
19년 전 조회 5,378
19년 전 조회 1,696
19년 전 조회 6,053
19년 전 조회 2,873
19년 전 조회 6,039
19년 전 조회 6,834
19년 전 조회 3,726
19년 전 조회 2,207
19년 전 조회 2,098
19년 전 조회 6,896
19년 전 조회 2,397
19년 전 조회 3,951
19년 전 조회 5,336
19년 전 조회 2,682
19년 전 조회 1,737
19년 전 조회 1,574
19년 전 조회 1,519
19년 전 조회 1,795
19년 전 조회 1,788
19년 전 조회 1,781
19년 전 조회 1,718
19년 전 조회 2,507
19년 전 조회 2,312
19년 전 조회 3,469
19년 전 조회 2,596
19년 전 조회 2,573
19년 전 조회 3,415
19년 전 조회 4,629
19년 전 조회 2,964
19년 전 조회 2,802
19년 전 조회 3,352
19년 전 조회 6,284
19년 전 조회 2,187
19년 전 조회 1,991
19년 전 조회 1,941
19년 전 조회 2,003
19년 전 조회 3,192
19년 전 조회 2,262
19년 전 조회 1,952
19년 전 조회 1,628
19년 전 조회 2,078
19년 전 조회 3,363
19년 전 조회 3,231
19년 전 조회 1,909
19년 전 조회 1,482
19년 전 조회 3,179
19년 전 조회 2,052
19년 전 조회 1,617
19년 전 조회 2,840
19년 전 조회 1,968
19년 전 조회 1,840
19년 전 조회 1,815
19년 전 조회 1,781
19년 전 조회 2,204
19년 전 조회 2,626
19년 전 조회 1,784
19년 전 조회 1,522
19년 전 조회 1,534
19년 전 조회 1,459
19년 전 조회 3,225
19년 전 조회 2,912
19년 전 조회 1,669
🐛 버그신고