MediaWiki:Common.js: Difference between revisions

m
no edit summary
mNo edit summary
mNo edit summary
Line 8: Line 8:
addOnloadHook(function(){
addOnloadHook(function(){
     $('div.tabdiv > ul > li').click(function(){
     $('div.tabdiv > ul > li').click(function(){
         $(this).parent().parent().find('> div').hide();
         $(this).parent().parent().children('div').hide();
         $((this).find('> a:first').attr('href')).show();
         $((this).children('a:first').attr('href')).show();
         $(this).parent().find('>li').removeClass('active').addClass('inactive');
         $(this).parent().children('li').removeClass('active').addClass('inactive');
         $(this).removeClass('inactive').addClass('active');
         $(this).removeClass('inactive').addClass('active');
     });
     });
Line 478: Line 478:


     headerList = headerList.filter(function(e){
     headerList = headerList.filter(function(e){
         return $(e).children('> td').length == 0;
         return $(e).children('td').length == 0;
     });
     });
     headerList = headerList.filter(function(e){
     headerList = headerList.filter(function(e){