//무카스 디백 프로젝트 스킨 개발관련된 작업물

<script language="javascript">
        $(document).ready(function(){
                $doc_h = $(window).height();
                $doc_w = $(window).width();
                $contents_h = $('.contents').height()+100;
                //브라우저 너비에 따라 콘텐츠창 사이즈 조정하기
                check_w_mode();
                
                
                $('.contents').css('height',$doc_h);//감춤
        });
        
        //browser resize
        $(window).resize(function(){
                //브라우저 창이 바뀔 경우, 함수 실행하기
                check_w_mode();
        });

        //Scroll Check
        $(window).scroll(function(){
                var scr_now = $(window).scrollLeft();
                //세로모드일경우, 좌우 스크롤 막기
                if($scr_left_sate != 'off'){
                        if(scr_now > '0'){
                                $(window).scrollLeft('0');
                        }
                }
        });

        function check_w_mode(){
                //가로 뷰일 경우, 우측영역 고정하기
                $doc_h = $(window).height();
                $doc_w = $(window).width();
                $check_width = $doc_h - $doc_w;
                $now_menu = $('.menu_left').css('display');
                if($check_width<=0){
                        //가로로 볼 경우
                        //showmenu 불러오기 전에, 우측메뉴 값 미리 설정해놓기
                        $('.menu_left').hide();
                        showMenu();
                        $now_w = $doc_w-'270';
                        $('.contents').css('width',$now_w);
                        
                        $scr_left_sate = 'off';
                        //alert($check_width);
                }else{
                        //세로로 볼 경우                        
                        //alert($now_w);
                        $('.menu_left').show();
                        showMenu();
                        $('.contents').css('width',$doc_w);
                        //alert($check_width);
                        $scr_left_sate = 'on';
                }
                //$('#test_div').text($now_menu);
                //alert($check_width);
        }
        function showMenu(bt){
                //alert('test');
                $now_menu = $('.menu_left').css('display');
                //alert($('.menu_left').css('display'));
                if($now_menu == 'none'){
                        $('.menu_left').show();
                        $('.contents').css('margin-left','270px');
                }else{
                        $('.menu_left').hide();
                        $('.contents').css('margin-left','0px');
                }
        }
</script>

© juroweb 2003-2014. All rights reserved
log in