지구인

간단한 퀵메뉴

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

그누에 적용하시려면 아래 소스를 따로 /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년 전 조회 6,116
19년 전 조회 7,212
19년 전 조회 2,708
19년 전 조회 2,931
19년 전 조회 4,409
19년 전 조회 2,402
19년 전 조회 3,838
19년 전 조회 3,110
19년 전 조회 2,955
19년 전 조회 2,433
19년 전 조회 2,718
19년 전 조회 2,818
19년 전 조회 3,324
19년 전 조회 3,989
19년 전 조회 3,494
19년 전 조회 3,024
19년 전 조회 2,509
19년 전 조회 3,169
19년 전 조회 3,279
19년 전 조회 2,803
19년 전 조회 2,527
19년 전 조회 3,563
19년 전 조회 5,102
19년 전 조회 5,308
19년 전 조회 2,534
19년 전 조회 2,428
19년 전 조회 5,226
19년 전 조회 9,218
19년 전 조회 2,285
19년 전 조회 5,168
19년 전 조회 4,604
19년 전 조회 2,859
19년 전 조회 5,210
19년 전 조회 3,044
19년 전 조회 3,929
19년 전 조회 2,857
19년 전 조회 3,682
19년 전 조회 2,205
19년 전 조회 5,619
19년 전 조회 1,969
19년 전 조회 6,317
19년 전 조회 3,121
19년 전 조회 6,294
19년 전 조회 7,073
19년 전 조회 3,975
19년 전 조회 2,457
19년 전 조회 2,343
19년 전 조회 7,137
19년 전 조회 2,642
19년 전 조회 4,189
19년 전 조회 5,584
19년 전 조회 2,918
19년 전 조회 1,957
19년 전 조회 1,810
19년 전 조회 1,754
19년 전 조회 2,030
19년 전 조회 2,051
19년 전 조회 2,026
19년 전 조회 1,951
19년 전 조회 2,754
19년 전 조회 2,561
19년 전 조회 3,708
19년 전 조회 2,840
19년 전 조회 2,800
19년 전 조회 3,653
19년 전 조회 4,865
19년 전 조회 3,211
19년 전 조회 3,053
19년 전 조회 3,595
19년 전 조회 6,516
19년 전 조회 2,441
19년 전 조회 2,230
19년 전 조회 2,189
19년 전 조회 2,249
19년 전 조회 3,424
19년 전 조회 2,494
19년 전 조회 2,176
19년 전 조회 1,878
19년 전 조회 2,328
19년 전 조회 3,602
19년 전 조회 3,460
19년 전 조회 2,171
19년 전 조회 1,716
19년 전 조회 3,407
19년 전 조회 2,286
19년 전 조회 1,860
19년 전 조회 3,076
19년 전 조회 2,211
19년 전 조회 2,084
19년 전 조회 2,052
19년 전 조회 2,018
19년 전 조회 2,439
19년 전 조회 2,862
19년 전 조회 2,015
19년 전 조회 1,759
19년 전 조회 1,764
19년 전 조회 1,722
19년 전 조회 3,446
19년 전 조회 3,149
19년 전 조회 1,887