퀵메뉴
<div id="floater2" style="position:absolute;z-index:5;">
내용
</div>
<script type="text/jscript">
<!--
// 스크립트는 반드시 스크롤될 내용 아래쪽에 넣습니다. 안그럼 오류가 발생합니다.
// 스크롤바 따라다니는 메뉴
var stmnLEFT = 21; // 스크롤메뉴의 좌측 위치
var stmnGAP1 = 112; // 페이지 헤더부분의 여백 (이보다 위로는 올라가지 않음)
var stmnGAP2 = 50; // 스크롤시 브라우저 상단과 약간 띄움. 필요없으면 0으로 세팅
var stmnBASE = 68; // 스크롤메뉴 초기 시작위치 (아무렇게나 해도 상관은 없지만 stmnGAP1과 약간 차이를 주는게 보기 좋음)
var stmnActivateSpeed = 2; // 움직임을 감지하는 속도 (숫자가 클수록 늦게 알아차림)
var stmnScrollSpeed = 1; // 스크롤되는 속도 (클수록 늦게 움직임)
var stmnTimer;
function RefreshStaticMenu() {
var stmnStartPoint, stmnEndPoint, stmnRefreshTimer;
stmnStartPoint = parseInt(floater2.style.top, 10);
stmnEndPoint = document.body.scrollTop + stmnGAP2;
if (stmnEndPoint < stmnGAP1) stmnEndPoint = stmnGAP1;
stmnRefreshTimer = stmnActivateSpeed;
if ( stmnStartPoint != stmnEndPoint ) {
stmnScrollAmount = Math.ceil( Math.abs( stmnEndPoint - stmnStartPoint ) / 15 );
floater2.style.top = parseInt(floater2.style.top, 10) + ( ( stmnEndPoint<stmnStartPoint ) ? -stmnScrollAmount : stmnScrollAmount );
stmnRefreshTimer = stmnScrollSpeed;
}
stmnTimer = setTimeout ("RefreshStaticMenu();", stmnRefreshTimer);
}
function InitializeStaticMenu() {
floater2.style.top = document.body.scrollTop + stmnBASE;
RefreshStaticMenu();
floater2.style.left = stmnLEFT;
}
//-->
</script>
<script type="text/jscript">InitializeStaticMenu();</script>
댓글 1개
게시글 목록
| 번호 | 제목 |
|---|---|
| 10624 |
jQuery
Easing Functions Cheat Sheet
|
| 10618 | |
| 10614 | |
| 10607 |
jQuery
좌우 슬라이드메뉴와 상하 슬라이드 메뉴
6
|
| 10606 | |
| 10603 | |
| 10599 | |
| 20077 | |
| 10598 | |
| 10597 | |
| 10595 | |
| 10593 | |
| 10591 |
Mobile
모바일 웹 개발에 큰 도움이 되는 피모 브라우저
1
|
| 10590 |
PHP
간단한 쿠폰번호 생성
|
| 10588 |
PHP
xml 파싱 예제
1
|
| 10586 |
PHP
eval
1
|
| 17645 |
제안서
제안서 유용한 도형
13
|
| 10585 |
jQuery
롤오버+슬라이드 질문드립니다.
|
| 10584 |
jQuery
jQuery path plugin
|
| 10580 |
JavaScript
아이폰일때 상단 검색바 숨기기
3
|
| 20070 | |
| 10579 | |
| 10578 | |
| 10574 | |
| 10573 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기