function left_menu(menu, ttt){ if(menu === 'myinfo' || menu === 'blog'){ if(is_login === false) { document.location.href = "/?menu=member&action=login"; return false; } } if ($("#container").hasClass("active")) { if(ttt){ //$('body').toggleClass('showMenu'); toggle_mobile(menu); } else { current_left_menu = menu; get_left_content(menu, ''); } } else { current_left_menu = menu; //$('body').toggleClass('showMenu'); toggle_mobile(menu); get_left_content(menu, ''); } } function toggle_mobile() { $("#container").toggleClass("active").off('click.closesidebar'); $(".m-menu").toggleClass("active"); $(".globalnav").toggleClass("active"); if ($("#container").hasClass("active")) { $('#container').transition({ x: '80%', duration: 500}); } else { $('#root, #container').css({ 'height' : 'auto' }); $('#container').transition({ x: 0, duration: 500}); } } function get_left_content(menu, section) { ///?ajx=1&menu=left_main§ion=" $.ajax({ type: "GET", cache: false, async: true, dataType: 'html', url: "/include/left_menu.inc.php", data: "", /* beforeSend: function() { $('#ajax_load_indicator').show().fadeIn('fast'); }, */ success: function(data) { if (data != undefined && data != null && data.length > 0) { $('#mLeftMenu').html(data); $('#mLeftMenu').css({height:'auto'}); var $WH = $(window).height(); var $SH = $('#sidebar').scrollHeight; $('#root').css({ 'width' : '100%', 'height' : ($WH>$SH?$WH:$SH) +'px', 'overflow' : 'hidden' }); $('#container').css({ 'height' : ($WH>$SH?$WH:$SH) +'px' }).off('click.closesidebar').one('click.closesidebar', function() { toggle_mobile(); }); } else { msg_ajx_alert_left('데이터가 없습니다.'); } }, error:function(data){ msg_ajx_alert_left('네트워크 연결에 실패 하였습니다.'); } }); } function go_menu(menu, sub, ttt){ switch(menu){ case 'left' : left_menu(sub, ttt); break; case 'best' : document.location.href="/?menu=best&action=list§ion="+sub; break; case 'novel' : document.location.href="/?menu=novel&action=list§ion="+sub; break; case 'board' : document.location.href="/?menu=board&action=list§ion="+sub; break; default : not_ready(); break; } }