Jump to content

MediaWiki:Common.js: Difference between revisions

No edit summary
No edit summary
Line 1: Line 1:
/* Any JavaScript here will be loaded for all users on every page load. */
/* Any JavaScript here will be loaded for all users on every page load. */


// ==========================================================================
 
 
/* Código para criar efeito Dropdown na Sidebar */
$(document).ready(function() {
    // Procura por listas de segundo/terceiro nível na barra lateral
    $('#mw-panel .portal ul ul').hide(); // Oculta os submenus inicialmente
 
    $('#mw-panel .portal ul li').has('ul').click(function(e) {
        // Evita que o clique feche se clicar no subitem
        if (e.target !== this) return;
       
        // Abre ou fecha o menu correspondente
        $(this).children('ul').slideToggle();
    }).css('cursor', 'pointer');
});
 
 
 
 
 
    // ==========================================================================
     // CONTROLADOR DE DROPDOWN NO ÍNDICE (TOC) - VERSÃO VISUAL FINAL
     // CONTROLADOR DE DROPDOWN NO ÍNDICE (TOC) - VERSÃO VISUAL FINAL
     // ==========================================================================
     // ==========================================================================