지구인

간단한 퀵메뉴

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

그누에 적용하시려면 아래 소스를 따로 /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,885
18년 전 조회 6,983
18년 전 조회 2,462
18년 전 조회 2,706
18년 전 조회 4,163
18년 전 조회 2,169
18년 전 조회 3,614
18년 전 조회 2,869
18년 전 조회 2,726
18년 전 조회 2,196
18년 전 조회 2,460
18년 전 조회 2,589
18년 전 조회 3,083
18년 전 조회 3,727
18년 전 조회 3,268
18년 전 조회 2,773
18년 전 조회 2,268
18년 전 조회 2,937
18년 전 조회 3,027
18년 전 조회 2,536
18년 전 조회 2,292
18년 전 조회 3,325
18년 전 조회 4,848
18년 전 조회 5,066
18년 전 조회 2,288
18년 전 조회 2,183
18년 전 조회 4,992
18년 전 조회 8,955
18년 전 조회 2,041
18년 전 조회 4,919
18년 전 조회 4,359
18년 전 조회 2,602
18년 전 조회 4,956
18년 전 조회 2,783
18년 전 조회 3,663
19년 전 조회 2,616
19년 전 조회 3,429
19년 전 조회 1,939
19년 전 조회 5,369
19년 전 조회 1,688
19년 전 조회 6,048
19년 전 조회 2,866
19년 전 조회 6,033
19년 전 조회 6,828
19년 전 조회 3,719
19년 전 조회 2,200
19년 전 조회 2,094
19년 전 조회 6,891
19년 전 조회 2,391
19년 전 조회 3,944
19년 전 조회 5,331
19년 전 조회 2,677
19년 전 조회 1,732
19년 전 조회 1,569
19년 전 조회 1,514
19년 전 조회 1,790
19년 전 조회 1,783
19년 전 조회 1,775
19년 전 조회 1,712
19년 전 조회 2,503
19년 전 조회 2,304
19년 전 조회 3,462
19년 전 조회 2,590
19년 전 조회 2,566
19년 전 조회 3,410
19년 전 조회 4,624
19년 전 조회 2,959
19년 전 조회 2,797
19년 전 조회 3,344
19년 전 조회 6,277
19년 전 조회 2,180
19년 전 조회 1,984
19년 전 조회 1,936
19년 전 조회 1,998
19년 전 조회 3,185
19년 전 조회 2,256
19년 전 조회 1,947
19년 전 조회 1,621
19년 전 조회 2,073
19년 전 조회 3,357
19년 전 조회 3,225
19년 전 조회 1,902
19년 전 조회 1,475
19년 전 조회 3,171
19년 전 조회 2,045
19년 전 조회 1,613
19년 전 조회 2,833
19년 전 조회 1,960
19년 전 조회 1,835
19년 전 조회 1,808
19년 전 조회 1,775
19년 전 조회 2,199
19년 전 조회 2,619
19년 전 조회 1,777
19년 전 조회 1,515
19년 전 조회 1,526
19년 전 조회 1,454
19년 전 조회 3,218
19년 전 조회 2,909
19년 전 조회 1,664
🐛 버그신고