상단메뉴 고정하기 정보
상단메뉴 고정하기
관련링크
            
            http://www.g4mob.com/__new/
            1258회 연결
        
                
            
            http://www.g4mob.com/archives/2027
            1053회 연결
        
            본문
$(window).scroll(function () {
        var height = $(document).scrollTop();
        if (parseInt(height) > 0) {
            $('#hd').css({
                "position": "fixed",
                "display": "block",
                "width":"100%",
                "z-index" : "10000"
            });
            $('#wrapper').css({
                "padding-top":"116px"
            });
        } else {
            $('.hd').css({
                "display": "block",
                "position":"relative",
                "z-index" : "10000"
            });
            $('#wrapper').css({
                "padding-top":"116px"
            });
        }
    });
그누보드 기본 템플릿 기준
                        
                추천
                
4
                
    4
댓글 9개
                
                    미안하지만 저 스크립트를 어느곳에 넣으면될가요 
초보가 보기에는 뭘 어덯게 해야 할지 모르겠내요 ....
                    초보가 보기에는 뭘 어덯게 해야 할지 모르겠내요 ....

                
                    위의 스크립트를 애래와 같이 <script type="text/javascript">와 </script>로 감싸서
head.php의 적당한 곳에 넣으시면 상단메뉴(헤드부분)가 고정이 됩니다.
--- 아 래 ---
<script type="text/javascript">
$(window).scroll(function () {
var height = $(document).scrollTop();
if (parseInt(height) > 0) {
$('#hd').css({
"position": "fixed",
"display": "block",
"width":"100%",
"z-index" : "10000"
});
$('#wrapper').css({
"padding-top":"116px"
});
} else {
$('.hd').css({
"display": "block",
"position":"relative",
"z-index" : "10000"
});
$('#wrapper').css({
"padding-top":"116px"
});
}
});
</script>
                    head.php의 적당한 곳에 넣으시면 상단메뉴(헤드부분)가 고정이 됩니다.
--- 아 래 ---
<script type="text/javascript">
$(window).scroll(function () {
var height = $(document).scrollTop();
if (parseInt(height) > 0) {
$('#hd').css({
"position": "fixed",
"display": "block",
"width":"100%",
"z-index" : "10000"
});
$('#wrapper').css({
"padding-top":"116px"
});
} else {
$('.hd').css({
"display": "block",
"position":"relative",
"z-index" : "10000"
});
$('#wrapper').css({
"padding-top":"116px"
});
}
});
</script>
                
                    좋은 팁 감사합니다                
                
                
            
                    
                
                    완전 짱짱, 감사합니다!                
                
                
            
                    
                
                    정말 감사합니다.^^                
                
                
            
                    
                
                    감사합니다                
                
                
            
                    
                
                    좋은정보 감사합니다.                
                
                
            
                    
                
                    정말 고맙습니다.                
                
                
            
                    
                
                    ㅠㅠ 왜 않될까요??