지구인

간단한 퀵메뉴

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

그누에 적용하시려면 아래 소스를 따로 /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,921
19년 전 조회 7,017
19년 전 조회 2,506
19년 전 조회 2,743
19년 전 조회 4,203
19년 전 조회 2,205
19년 전 조회 3,650
19년 전 조회 2,914
19년 전 조회 2,763
19년 전 조회 2,228
19년 전 조회 2,504
19년 전 조회 2,623
19년 전 조회 3,115
19년 전 조회 3,774
19년 전 조회 3,307
19년 전 조회 2,812
19년 전 조회 2,307
19년 전 조회 2,972
19년 전 조회 3,067
19년 전 조회 2,574
19년 전 조회 2,336
19년 전 조회 3,359
19년 전 조회 4,890
19년 전 조회 5,099
19년 전 조회 2,316
19년 전 조회 2,216
19년 전 조회 5,025
19년 전 조회 8,993
19년 전 조회 2,080
19년 전 조회 4,953
19년 전 조회 4,392
19년 전 조회 2,647
19년 전 조회 4,991
19년 전 조회 2,819
19년 전 조회 3,698
19년 전 조회 2,647
19년 전 조회 3,465
19년 전 조회 1,976
19년 전 조회 5,407
19년 전 조회 1,733
19년 전 조회 6,085
19년 전 조회 2,902
19년 전 조회 6,071
19년 전 조회 6,868
19년 전 조회 3,757
19년 전 조회 2,236
19년 전 조회 2,126
19년 전 조회 6,925
19년 전 조회 2,425
19년 전 조회 3,981
19년 전 조회 5,363
19년 전 조회 2,704
19년 전 조회 1,762
19년 전 조회 1,601
19년 전 조회 1,545
19년 전 조회 1,820
19년 전 조회 1,823
19년 전 조회 1,828
19년 전 조회 1,745
19년 전 조회 2,540
19년 전 조회 2,339
19년 전 조회 3,500
19년 전 조회 2,631
19년 전 조회 2,603
19년 전 조회 3,442
19년 전 조회 4,661
19년 전 조회 3,001
19년 전 조회 2,832
19년 전 조회 3,381
19년 전 조회 6,318
19년 전 조회 2,215
19년 전 조회 2,021
19년 전 조회 1,976
19년 전 조회 2,033
19년 전 조회 3,221
19년 전 조회 2,294
19년 전 조회 1,982
19년 전 조회 1,661
19년 전 조회 2,115
19년 전 조회 3,398
19년 전 조회 3,257
19년 전 조회 1,940
19년 전 조회 1,519
19년 전 조회 3,209
19년 전 조회 2,079
19년 전 조회 1,647
19년 전 조회 2,864
19년 전 조회 2,001
19년 전 조회 1,881
19년 전 조회 1,842
19년 전 조회 1,807
19년 전 조회 2,233
19년 전 조회 2,652
19년 전 조회 1,813
19년 전 조회 1,549
19년 전 조회 1,560
19년 전 조회 1,493
19년 전 조회 3,248
19년 전 조회 2,942
19년 전 조회 1,697