MediaWiki:Common.js: Difference between revisions

m
no edit summary
mNo edit summary
mNo edit summary
Line 11: Line 11:


addOnloadHook(function(){
addOnloadHook(function(){
     $('div.tabdiv > div').hide();
     $('div.tabdiv > ul > li').click(function(){
    $('div.tabdiv > div:first').show();
        $(this).parent().find('> li').removeClass('active').addClass('inactive');
    $('div.tabdiv > ul > li:first').removeClass('inactive').addClass('active');
         $(this).removeClass('inactive').addClass('active');
    $('div.tabdiv > ul > li').each(function(){
         $(this).parent().parent().find('> div').hide();
         $(this).addClass('inactive').removeClass('active');
        $($(this).find('> a:first').attr('href')).show();
         $(this).click(function(){
            var target = $(this).find('> a:first').attr('href');
            $(this).addClass('active').removeClass('inactive');
            $(this).parent().parent().find('> div').hide();
            $(target).show();
        });
     });
     });
    $('div.tabdiv > ul > li:first').click();
});
});
/*
/*