관리-도구
편집 파일: jQuery.CustomTabs.js
function initTabs() { $('.customtabs').each(function () { $(this).siblings('div').children('div:gt(0)').hide(); $(this).children('a:first').addClass('active'); $(this).find('a').click(function () { setTabByHandler(this); return false; }); }); } $(document).ready(function(){ initTabs(); }); function setTabByHandler(elm) { if (elm && !$(elm).hasClass("disabled")) { var current_content_div = '#' + $(elm).attr('rel'); $(elm).siblings().removeClass('active'); $(elm).addClass('active'); $(current_content_div).siblings().hide(); $(current_content_div).show(); } $(elm).blur(); return false; } function setTabToElem(elm) { setTabByHandler($("a[rel='" + elm + "']:first")); }