Diferencia entre revisiones de «MediaWiki:Common.css»

Sin resumen de edición
Sin resumen de edición
Línea 41: Línea 41:
/* TABLAS ESTILO CEBRA*/
/* TABLAS ESTILO CEBRA*/
// Initialises stripes on all zebra tables after page load
// Initialises stripes on all zebra tables after page load
$(document).ready(function() {
$(document).ready(function() {
$('table.dqwtabla tbody tr:nth-child(even)').addClass('even');
$('table.zebra tbody tr:nth-child(even)').addClass('even');
$('table.dqwtabla tbody tr:nth-child(odd)').addClass('odd');
$('table.zebra tbody tr:nth-child(odd)').addClass('odd');
});
});


Línea 50: Línea 49:
$(document).on('sortEnd.tablesorter', function(event) {
$(document).on('sortEnd.tablesorter', function(event) {
var table = $(event.target);
var table = $(event.target);
if(table.hasClass('dqwtabla')) {
if(table.hasClass('zebra')) {
$('tbody tr:nth-child(even)',table).addClass('even').removeClass('odd');
$('tbody tr:nth-child(even)',table).addClass('even').removeClass('odd');
$('tbody tr:nth-child(odd)',table).addClass('odd').removeClass('even');
$('tbody tr:nth-child(odd)',table).addClass('odd').removeClass('even');
Línea 56: Línea 55:
});
});


table.dqwtabla tr.odd {
table.zebra tr.odd {
background-color: #aad7fd;
background-color: #aad7fd;
}
}