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. | $('table.zebra tbody tr:nth-child(even)').addClass('even'); | ||
$('table. | $('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(' | 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. | table.zebra tr.odd { | ||
background-color: #aad7fd; | background-color: #aad7fd; | ||
} | } | ||