지구인

간단한 퀵메뉴

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

그누에 적용하시려면 아래 소스를 따로 /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,901
18년 전 조회 6,997
18년 전 조회 2,476
18년 전 조회 2,719
18년 전 조회 4,179
18년 전 조회 2,182
18년 전 조회 3,627
18년 전 조회 2,882
18년 전 조회 2,742
18년 전 조회 2,210
18년 전 조회 2,477
18년 전 조회 2,601
18년 전 조회 3,096
19년 전 조회 3,744
19년 전 조회 3,280
19년 전 조회 2,790
19년 전 조회 2,282
19년 전 조회 2,950
19년 전 조회 3,044
19년 전 조회 2,553
19년 전 조회 2,308
19년 전 조회 3,340
19년 전 조회 4,864
19년 전 조회 5,078
19년 전 조회 2,302
19년 전 조회 2,194
19년 전 조회 5,004
19년 전 조회 8,973
19년 전 조회 2,055
19년 전 조회 4,934
19년 전 조회 4,376
19년 전 조회 2,615
19년 전 조회 4,971
19년 전 조회 2,799
19년 전 조회 3,677
19년 전 조회 2,626
19년 전 조회 3,440
19년 전 조회 1,957
19년 전 조회 5,385
19년 전 조회 1,706
19년 전 조회 6,059
19년 전 조회 2,880
19년 전 조회 6,046
19년 전 조회 6,841
19년 전 조회 3,734
19년 전 조회 2,216
19년 전 조회 2,106
19년 전 조회 6,906
19년 전 조회 2,405
19년 전 조회 3,957
19년 전 조회 5,344
19년 전 조회 2,690
19년 전 조회 1,745
19년 전 조회 1,583
19년 전 조회 1,525
19년 전 조회 1,800
19년 전 조회 1,797
19년 전 조회 1,790
19년 전 조회 1,724
19년 전 조회 2,518
19년 전 조회 2,317
19년 전 조회 3,474
19년 전 조회 2,605
19년 전 조회 2,578
19년 전 조회 3,426
19년 전 조회 4,639
19년 전 조회 2,973
19년 전 조회 2,809
19년 전 조회 3,361
19년 전 조회 6,289
19년 전 조회 2,194
19년 전 조회 1,999
19년 전 조회 1,950
19년 전 조회 2,011
19년 전 조회 3,195
19년 전 조회 2,268
19년 전 조회 1,958
19년 전 조회 1,638
19년 전 조회 2,084
19년 전 조회 3,368
19년 전 조회 3,237
19년 전 조회 1,914
19년 전 조회 1,492
19년 전 조회 3,189
19년 전 조회 2,061
19년 전 조회 1,625
19년 전 조회 2,843
19년 전 조회 1,975
19년 전 조회 1,849
19년 전 조회 1,822
19년 전 조회 1,789
19년 전 조회 2,211
19년 전 조회 2,634
19년 전 조회 1,792
19년 전 조회 1,530
19년 전 조회 1,538
19년 전 조회 1,469
19년 전 조회 3,232
19년 전 조회 2,922
19년 전 조회 1,678