$(function(){ $(".btnMenu").click( // 좌측 메뉴와 센터 컨텐츠를 margin-left 260px 만큼 이동 function () { if (!$(this).data("clickStatus")) { $(this).data("clickStatus", 1); fn_resizeHeight(); $('#slideLeft').removeClass('blind').addClass('on').animate({ 'margin-left' : '260px' }, 'fast', function() { }); $('#MTop').animate({ 'margin-left' : '260px' }, 'fast', function() { }); } else { $(this).data("clickStatus", 0); $('#MTop').animate({ 'margin-left' : '0'}, 'fast', function() { }); $('#slideLeft').animate({ 'margin-left' : '0' }, 'fast', function() { }).queue(function(){ $(this).removeClass('on').addClass('blind'); $(this).dequeue(); }); } } ); $(".btnSearch").click( // 좌측 메뉴와 센터 컨텐츠를 margin-left 260px 만큼 이동 function () { if (!$(this).data("clickStatus")) { $(this).data("clickStatus", 1); fn_resizeHeight(); $('#slideRight').removeClass('blind').addClass('on').animate({ right: 0 }, 'fast', function() { }); $('#MTop').animate({ 'margin-left' : '-260px' }, 'fast', function() { }); } else { $(this).data("clickStatus", 0); $('#MTop').animate({ 'margin-left' : '0' }, 'fast', function() { }); $('#slideRight').animate({ right: -260 }, 'fast', function() { }).queue(function(){ $(this).removeClass('on').addClass('blind'); $(this).dequeue(); }); } } ); }); //좌,우측 페이지 scrren 세로사이즈에 맞게 리사이징 fn_resizeHeight = function() { var sideHeight = $(document).height(); $('.sideMenu').css({'height':sideHeight}); }