지구인

간단한 퀵메뉴

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

그누에 적용하시려면 아래 소스를 따로 /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,896
18년 전 조회 6,991
18년 전 조회 2,472
18년 전 조회 2,718
18년 전 조회 4,173
18년 전 조회 2,176
18년 전 조회 3,622
18년 전 조회 2,880
18년 전 조회 2,738
18년 전 조회 2,206
18년 전 조회 2,473
18년 전 조회 2,599
18년 전 조회 3,095
18년 전 조회 3,738
18년 전 조회 3,275
19년 전 조회 2,786
19년 전 조회 2,277
19년 전 조회 2,946
19년 전 조회 3,034
19년 전 조회 2,548
19년 전 조회 2,302
19년 전 조회 3,337
19년 전 조회 4,860
19년 전 조회 5,073
19년 전 조회 2,298
19년 전 조회 2,190
19년 전 조회 5,000
19년 전 조회 8,967
19년 전 조회 2,049
19년 전 조회 4,930
19년 전 조회 4,369
19년 전 조회 2,610
19년 전 조회 4,967
19년 전 조회 2,794
19년 전 조회 3,673
19년 전 조회 2,622
19년 전 조회 3,436
19년 전 조회 1,948
19년 전 조회 5,381
19년 전 조회 1,699
19년 전 조회 6,056
19년 전 조회 2,877
19년 전 조회 6,041
19년 전 조회 6,837
19년 전 조회 3,729
19년 전 조회 2,212
19년 전 조회 2,102
19년 전 조회 6,901
19년 전 조회 2,400
19년 전 조회 3,954
19년 전 조회 5,341
19년 전 조회 2,685
19년 전 조회 1,741
19년 전 조회 1,579
19년 전 조회 1,522
19년 전 조회 1,797
19년 전 조회 1,793
19년 전 조회 1,787
19년 전 조회 1,721
19년 전 조회 2,513
19년 전 조회 2,314
19년 전 조회 3,473
19년 전 조회 2,600
19년 전 조회 2,573
19년 전 조회 3,420
19년 전 조회 4,635
19년 전 조회 2,966
19년 전 조회 2,807
19년 전 조회 3,355
19년 전 조회 6,286
19년 전 조회 2,190
19년 전 조회 1,995
19년 전 조회 1,946
19년 전 조회 2,006
19년 전 조회 3,193
19년 전 조회 2,267
19년 전 조회 1,954
19년 전 조회 1,634
19년 전 조회 2,083
19년 전 조회 3,367
19년 전 조회 3,236
19년 전 조회 1,910
19년 전 조회 1,486
19년 전 조회 3,184
19년 전 조회 2,055
19년 전 조회 1,622
19년 전 조회 2,841
19년 전 조회 1,973
19년 전 조회 1,844
19년 전 조회 1,818
19년 전 조회 1,786
19년 전 조회 2,208
19년 전 조회 2,631
19년 전 조회 1,789
19년 전 조회 1,527
19년 전 조회 1,535
19년 전 조회 1,462
19년 전 조회 3,227
19년 전 조회 2,918
19년 전 조회 1,673
🐛 버그신고