퀵메뉴 2개사용할수 없나요? > 그누4 질문답변

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기
기존 게시물은 열람만 가능합니다.

퀵메뉴 2개사용할수 없나요? 정보

퀵메뉴 2개사용할수 없나요?

본문

오른쪽 퀵메뉴는 사용중인대 왼쪽에 추가 할려면 어떻해 할까요?

네이버 검색으로는 이런게 있던대..

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <title></title>
<style type="text/css">
div {position:absolute; visibility:visible} /*그냥 div 에 무조건 적용되도록 했습니다*/
</style>

</head>
<body><!-- 내용1 과 내용 2 로 나눴습니다^^ 해서 내용2는 겹치지 않도록 left 를 100px 를 준 상태구요 -->
<div id="floater1" style="position:absolute; left:0px; top:0px">내용1</div>
<div id="floater2" style="position:absolute; left:100px; top:0px">내용2</div>
<script type="text/javascript" language='javascript'>
    var scrollStat = true;
    position_start = 100;
    lastScrollY = 200;

//브라우저가 ie 인지 네스케이프 인지 오페라 인지 등등을 확인하는 곳입니다
    NS = (document.layers) ? 1 : 0;
    IE = (document.all) ? 1 : 0;
    OP = ((document.getElementById) && (navigator.appName == "Opera")) ? 1 : 0;
    NSSECHS = ((document.getElementById) && (navigator.appName == "Netscape")) ? 1 : 0;

//내용 1인 position_1 과 내용 2인 position_2 로 position 변수를 두개로 나누웠습니다^^

    if (IE) {

        position_1 = document.all.floater1.style.pixelTop;
        position_2 = document.all.floater2.style.pixelTop;
    }
    if (OP) {
        position_1 = document.getElementById("floater1").style.pixelTop;
        position_2 = document.getElementById("floater2").style.pixelTop;
    }
    if (NS) {
        position_start = 15;
        position_1 = document.floater1.top;
        position_2 = document.floater2.top;
    }
 
    function abstand() {
        if (scrollStat == false) return; //화면위치가 변경되지 않았으면 작동하지 않도록 하는 명령입니다.

//각 브라우저 들의 스크롤의 위치를 구합니다.

        if (IE) { diffY = document.body.scrollTop; }
        if (NS) { diffY = self.pageYOffset; }
        if (OP) { diffY = document.getElementsByTagName("body")[0].scrollTop; }

//스크롤 위치와 lastScrollY (스크립트 마지막 부분에서 계산하죠^^) 의 값이 같지 않다면^^

//스크롤을 이동할 크기를 구합니다. 0이 될때까지 이작업이 계속 되는거죠^^

        if (diffY != lastScrollY) {

            percent = .1 * (diffY - lastScrollY);
         
            if (percent > 0) percent = Math.ceil(percent);
            else percent = Math.floor(percent);

//나누어 놓은 position_1, position_2 변수에 각각 percent 변수를 더해줍니다

            position_1 += percent;
            position_2 += percent;

//브라우저가 ie 인 경우에
//floater1, floater2 의 브라우저상의 젤 위에서 시작할 부분을 적용시킵니다
            if (IE) {
                document.all.floater1.style.pixelTop = position_1 + position_start;
                document.all.floater2.style.pixelTop = position_2 + position_start;

//floater1 의 브라우저의 상단의 위치를 0으로 만듭니다..
                if (document.all.floater1.style.pixelTop < 0) {
                    document.all.floater1.style.pixelTop = 0;
                }

//floater2 의 브라우저의 상단의 위치를 0으로 만듭니다..
                if (document.all.floater2.style.pixelTop < 0) {
                    document.all.floater2.style.pixelTop = 0;
                }
            }


            if (OP) {
                document.getElementById("floater1").style.PixelTop = position_1 + position_start;
                document.getElementById("floater2").style.PixelTop = position_2 + position_start;
            }
            if (NS) {
                document.floater1.top = position_1 + position_start;
                document.floater2.top = position_2 + position_start;
            }

//요기는 floater1, floater2  1/1000 초당 위치를 계산해주는 곳이네요^^;
            lastScrollY = lastScrollY + percent;

        }
    }

//요기는 abstand() 요 함수를 호출을 하는 부분인데요^^ setInterval() 이 함수를 사용해서 적해놓은 시간마다

//호출을 할수있도록 한곳입니다. ("abstand()", 1) 앞쪽 abstand() 요부분이 함수명이구요 뒤에 1은 시간이네요

//1000 이 1초를 나타내므로 1이면 1/1000 이구요^^; 1/1000 마다 abstand() 이 함수를 호출하는 것이네요
    if (NS || IE || OP) action = window.setInterval("abstand()", 1);
</script>
</body>
</html>

댓글 전체

전체 66,554 |RSS
그누4 질문답변 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1402호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT