Cambios

Busca en cnbGuatemala con Google

sin resumen de edición
Línea 1: Línea 1:  +
/*hide empty table columns*/
 +
( function ( $, mw ) {
 +
$('.smwtable tr th').each(function(i) {
 +
    //select all tds in this column
 +
    var tds = $(this).parents('table')
 +
              .find('tr td:nth-child(' + (i + 1) + ')');
 +
        //check if all the cells in this column are empty
 +
        if(tds.length == tds.filter(':empty').length) {
 +
            //hide header
 +
            $(this).hide();
 +
            //hide cells
 +
            tds.hide();
 +
        }
 +
});
 +
 +
} ( jQuery, mediaWiki ) );