|
|
(No se muestran 16 ediciones intermedias del mismo usuario) |
Línea 1: |
Línea 1: |
| /* Cualquier código JavaScript escrito aquí se cargará para todos los usuarios en cada carga de página */
| |
| $(document).ready(function() { | | $(document).ready(function() { |
| // Ocultar/Mostrar sidebar
| | $('#p-navigation, #mw-sidebar-action-toggle').remove(); |
| $('.mw-portlet h3').append(' <span class="toggle-sidebar">(ocultar)</span>'); | |
| $('.toggle-sidebar').click(function() {
| |
| $(this).parent().next('div').toggle();
| |
| $(this).text($(this).text() === '(ocultar)' ? '(mostrar)' : '(ocultar)');
| |
| });
| |
| | |
| // Agregar funcionalidad de expandir/colapsar
| |
| $('.mw-portlet li:contains(":expand")').each(function() {
| |
| var $this = $(this);
| |
| $this.html('<span class="toggle">▼</span> ' + $this.html().replace(':expand ', ''));
| |
| $this.children('.toggle').click(function() {
| |
| $(this).parent().nextAll().toggle();
| |
| $(this).text($(this).text() === '▼' ? '▶' : '▼');
| |
| });
| |
| });
| |
| | |
| // Ocultar subniveles al inicio
| |
| $('.mw-portlet li:contains(":expand")').nextAll().hide();
| |
| }); | | }); |
Revisión actual - 18:48 6 mar 2025
$(document).ready(function() {
$('#p-navigation, #mw-sidebar-action-toggle').remove();
});