지구인

간단한 퀵메뉴

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

그누에 적용하시려면 아래 소스를 따로 /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,219
19년 전 조회 7,315
19년 전 조회 2,816
19년 전 조회 3,037
19년 전 조회 4,515
19년 전 조회 2,503
19년 전 조회 3,952
19년 전 조회 3,207
19년 전 조회 3,077
19년 전 조회 2,533
19년 전 조회 2,818
19년 전 조회 2,920
19년 전 조회 3,443
19년 전 조회 4,084
19년 전 조회 3,613
19년 전 조회 3,120
19년 전 조회 2,630
19년 전 조회 3,287
19년 전 조회 3,378
19년 전 조회 2,886
19년 전 조회 2,639
19년 전 조회 3,655
19년 전 조회 5,216
19년 전 조회 5,430
19년 전 조회 2,651
19년 전 조회 2,536
19년 전 조회 5,342
19년 전 조회 9,316
19년 전 조회 2,374
19년 전 조회 5,274
19년 전 조회 4,717
19년 전 조회 2,955
19년 전 조회 5,321
19년 전 조회 3,146
19년 전 조회 4,024
19년 전 조회 2,968
19년 전 조회 3,787
19년 전 조회 2,307
19년 전 조회 5,734
19년 전 조회 2,057
19년 전 조회 6,418
19년 전 조회 3,217
19년 전 조회 6,393
19년 전 조회 7,199
19년 전 조회 4,084
19년 전 조회 2,557
19년 전 조회 2,448
19년 전 조회 7,250
19년 전 조회 2,745
19년 전 조회 4,288
19년 전 조회 5,688
19년 전 조회 3,018
19년 전 조회 2,065
19년 전 조회 1,908
19년 전 조회 1,860
19년 전 조회 2,139
19년 전 조회 2,150
19년 전 조회 2,123
19년 전 조회 2,063
19년 전 조회 2,880
19년 전 조회 2,661
19년 전 조회 3,813
19년 전 조회 2,930
19년 전 조회 2,897
19년 전 조회 3,766
19년 전 조회 4,969
19년 전 조회 3,319
19년 전 조회 3,153
19년 전 조회 3,715
19년 전 조회 6,622
19년 전 조회 2,527
19년 전 조회 2,324
19년 전 조회 2,279
19년 전 조회 2,339
19년 전 조회 3,519
19년 전 조회 2,598
19년 전 조회 2,281
19년 전 조회 2,000
19년 전 조회 2,413
19년 전 조회 3,720
19년 전 조회 3,577
19년 전 조회 2,280
19년 전 조회 1,817
19년 전 조회 3,508
19년 전 조회 2,393
19년 전 조회 1,963
19년 전 조회 3,189
19년 전 조회 2,310
19년 전 조회 2,188
19년 전 조회 2,163
19년 전 조회 2,124
19년 전 조회 2,548
19년 전 조회 2,965
19년 전 조회 2,112
19년 전 조회 1,856
19년 전 조회 1,881
19년 전 조회 1,817
19년 전 조회 3,553
19년 전 조회 3,252
19년 전 조회 2,000