|
|
(No se muestran 15 ediciones intermedias del mismo usuario) |
Línea 1: |
Línea 1: |
| $(document).ready(function() { | | $(document).ready(function() { |
| // Manejo del botón "ocultar"
| | $('#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)');
| |
| });
| |
| | |
| // Funcionalidad de expandir/cerrar subniveles
| |
| $('.mw-portlet li:contains(":expand")').each(function() {
| |
| var $this = $(this);
| |
| var sectionTitle = $this.text().replace(':expand ', '');
| |
| $this.html('<span class="toggle">▼</span> ' + sectionTitle);
| |
| $this.click(function() {
| |
| $(this).nextAll('li').toggle();
| |
| var toggleSymbol = $(this).children('.toggle');
| |
| toggleSymbol.text(toggleSymbol.text() === '▼' ? '▶' : '▼');
| |
| });
| |
| });
| |
| | |
| // Ocultar subniveles al inicio
| |
| $('.mw-portlet li:contains(":expand")').nextAll('li').hide();
| |
| }); | | }); |
Revisión actual - 18:48 6 mar 2025
$(document).ready(function() {
$('#p-navigation, #mw-sidebar-action-toggle').remove();
});