지구인

간단한 퀵메뉴

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

그누에 적용하시려면 아래 소스를 따로 /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,985
19년 전 조회 7,065
19년 전 조회 2,559
19년 전 조회 2,786
19년 전 조회 4,258
19년 전 조회 2,246
19년 전 조회 3,689
19년 전 조회 2,969
19년 전 조회 2,807
19년 전 조회 2,277
19년 전 조회 2,560
19년 전 조회 2,666
19년 전 조회 3,156
19년 전 조회 3,833
19년 전 조회 3,347
19년 전 조회 2,866
19년 전 조회 2,353
19년 전 조회 3,024
19년 전 조회 3,130
19년 전 조회 2,633
19년 전 조회 2,376
19년 전 조회 3,407
19년 전 조회 4,950
19년 전 조회 5,147
19년 전 조회 2,370
19년 전 조회 2,262
19년 전 조회 5,065
19년 전 조회 9,040
19년 전 조회 2,122
19년 전 조회 5,005
19년 전 조회 4,436
19년 전 조회 2,707
19년 전 조회 5,046
19년 전 조회 2,871
19년 전 조회 3,758
19년 전 조회 2,692
19년 전 조회 3,500
19년 전 조회 2,031
19년 전 조회 5,458
19년 전 조회 1,786
19년 전 조회 6,152
19년 전 조회 2,956
19년 전 조회 6,130
19년 전 조회 6,910
19년 전 조회 3,806
19년 전 조회 2,284
19년 전 조회 2,186
19년 전 조회 6,968
19년 전 조회 2,469
19년 전 조회 4,026
19년 전 조회 5,423
19년 전 조회 2,751
19년 전 조회 1,801
19년 전 조회 1,644
19년 전 조회 1,591
19년 전 조회 1,873
19년 전 조회 1,884
19년 전 조회 1,868
19년 전 조회 1,787
19년 전 조회 2,579
19년 전 조회 2,392
19년 전 조회 3,544
19년 전 조회 2,672
19년 전 조회 2,642
19년 전 조회 3,480
19년 전 조회 4,702
19년 전 조회 3,057
19년 전 조회 2,879
19년 전 조회 3,419
19년 전 조회 6,363
19년 전 조회 2,276
19년 전 조회 2,073
19년 전 조회 2,045
19년 전 조회 2,078
19년 전 조회 3,266
19년 전 조회 2,339
19년 전 조회 2,019
19년 전 조회 1,716
19년 전 조회 2,174
19년 전 조회 3,450
19년 전 조회 3,300
19년 전 조회 1,997
19년 전 조회 1,574
19년 전 조회 3,248
19년 전 조회 2,129
19년 전 조회 1,693
19년 전 조회 2,921
19년 전 조회 2,046
19년 전 조회 1,939
19년 전 조회 1,892
19년 전 조회 1,850
19년 전 조회 2,293
19년 전 조회 2,709
19년 전 조회 1,858
19년 전 조회 1,607
19년 전 조회 1,614
19년 전 조회 1,564
19년 전 조회 3,290
19년 전 조회 2,995
19년 전 조회 1,735