따

common.js 에 있는 menu() 함수는 어떤 기능을 가지고 있나요?

common.js 에 있는 menu() 함수는 어떤 기능을 가지고 있나요?    



    var last_id = null;
 
    function menu(id) {
        if (id != last_id) {
            if (last_id != null)
                document.getElementById(last_id).style.display = "none";
           
   document.getElementById(id).style.display = "block";
            last_id = id;
        }
        else {
            document.getElementById(id).style.display = "none";
            last_id = null;
        }
    }




보니까, admin.head.php 에서 호출 되던데요..

function imageview(id, w, h)
{

    menu(id);

    var el_id = document.getElementById(id);
 
    submenu = el_id.style;
    submenu.left = tempX - ( w + 11 );
    submenu.top  = tempY - ( h / 2 );

    selectBoxVisible();

    if (el_id.style.display != 'none')
        selectBoxHidden(id);
}

function help(id, left, top)
{
    menu(id);

    var el_id = document.getElementById(id);

    submenu = el_id.style;
    submenu.left = tempX - 50 + left;
    submenu.top  = tempY + 15 + top;

    selectBoxVisible();

    if (el_id.style.display != 'none')
        selectBoxHidden(id);
}

댓글 1개

말풍선 박스 나오는 겁니다.

? 아이콘 누르면 설명 나오는거 있죠..
만약 두개가 나란히 있을때 1? 2? 두개 다 뜨면 곤란하니까 각각의 아이디를 부여해서 하나씩 보이고 감추는 기능입니다.
댓글을 작성하시려면 로그인이 필요합니다.

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

+
제목 글쓴이 날짜 조회
10-02-09 조회 1,765
10-02-09 조회 1,670
10-02-09 조회 1,636
10-02-09 조회 1,070
10-02-09 조회 1,078
10-02-09 조회 1,022
10-02-08 조회 1,184
10-02-08 조회 2,809
10-02-08 조회 1,672
10-02-08 조회 1,284
10-02-08 조회 1,402
10-02-08 조회 1,767
10-02-08 조회 1,639
10-02-08 조회 1,107
10-02-08 조회 1,092
10-02-08 조회 1,679
10-02-08 조회 1,331
10-02-08 조회 1,645
10-02-08 조회 2,158
10-02-08 조회 2,031