$(function(){ // °øÅë ÅÇ ¸Þ´º $('.tabs_active').each(function(){ var active, content, links = $(this).find('a'); active = links.first().parents('li').addClass('on'); content = $(active.children('a').attr('href')); links.not(':first').each(function () { $($(this).attr('href')).hide(); }); $(this).on('click', 'a', function(e){ active.removeClass('on'); content.hide(); active = $(this).parents('li'); content = $($(this).attr('href')); active.addClass('on'); content.show(); e.preventDefault(); }); }); }); function time_to_kor (time){ //½Ã°£º¯°æ var now_time = new Date().getTime() - time * 1000; var sign_timedata = new Date(time * 1000); var time_kor = ''; if( now_time > 3600 * 24 * 1000 ) { var month = (sign_timedata.getMonth() + 1); var date = sign_timedata.getDate(); if(month < 10) month = '0' + month; if(date < 10) date = '0' + date; time_kor = sign_timedata.getFullYear() + '.' + month + '.' + date; } else if( now_time > 3600 * 1000 ) { time_kor = Math.floor(now_time / 3600000) + '½Ã°£Àü'; } else { time_kor = Math.floor(now_time / 60000) + 'ºÐÀü'; } return time_kor; }