지구인

간단한 퀵메뉴

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

그누에 적용하시려면 아래 소스를 따로 /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,906
18년 전 조회 7,000
18년 전 조회 2,486
19년 전 조회 2,724
19년 전 조회 4,185
19년 전 조회 2,190
19년 전 조회 3,636
19년 전 조회 2,891
19년 전 조회 2,747
19년 전 조회 2,215
19년 전 조회 2,482
19년 전 조회 2,605
19년 전 조회 3,102
19년 전 조회 3,753
19년 전 조회 3,288
19년 전 조회 2,796
19년 전 조회 2,291
19년 전 조회 2,956
19년 전 조회 3,049
19년 전 조회 2,561
19년 전 조회 2,314
19년 전 조회 3,351
19년 전 조회 4,871
19년 전 조회 5,087
19년 전 조회 2,306
19년 전 조회 2,197
19년 전 조회 5,010
19년 전 조회 8,980
19년 전 조회 2,060
19년 전 조회 4,940
19년 전 조회 4,382
19년 전 조회 2,620
19년 전 조회 4,978
19년 전 조회 2,805
19년 전 조회 3,680
19년 전 조회 2,634
19년 전 조회 3,449
19년 전 조회 1,963
19년 전 조회 5,392
19년 전 조회 1,714
19년 전 조회 6,066
19년 전 조회 2,885
19년 전 조회 6,052
19년 전 조회 6,848
19년 전 조회 3,740
19년 전 조회 2,221
19년 전 조회 2,112
19년 전 조회 6,912
19년 전 조회 2,408
19년 전 조회 3,963
19년 전 조회 5,350
19년 전 조회 2,693
19년 전 조회 1,749
19년 전 조회 1,590
19년 전 조회 1,533
19년 전 조회 1,809
19년 전 조회 1,800
19년 전 조회 1,797
19년 전 조회 1,729
19년 전 조회 2,523
19년 전 조회 2,323
19년 전 조회 3,478
19년 전 조회 2,609
19년 전 조회 2,585
19년 전 조회 3,433
19년 전 조회 4,646
19년 전 조회 2,982
19년 전 조회 2,816
19년 전 조회 3,366
19년 전 조회 6,298
19년 전 조회 2,202
19년 전 조회 2,005
19년 전 조회 1,957
19년 전 조회 2,017
19년 전 조회 3,207
19년 전 조회 2,276
19년 전 조회 1,964
19년 전 조회 1,646
19년 전 조회 2,091
19년 전 조회 3,374
19년 전 조회 3,244
19년 전 조회 1,919
19년 전 조회 1,499
19년 전 조회 3,195
19년 전 조회 2,065
19년 전 조회 1,634
19년 전 조회 2,849
19년 전 조회 1,982
19년 전 조회 1,859
19년 전 조회 1,831
19년 전 조회 1,792
19년 전 조회 2,215
19년 전 조회 2,640
19년 전 조회 1,801
19년 전 조회 1,535
19년 전 조회 1,544
19년 전 조회 1,472
19년 전 조회 3,238
19년 전 조회 2,930
19년 전 조회 1,684