Jump to content

MediaWiki:Common.js: Difference between revisions

No edit summary
No edit summary
Line 39: Line 39:
             });
             });


             // 3. Cria o chevron inicial fechado (›)
             // 3. Cria o chevron (com margem à esquerda para dar o espaço correto)
             var $toggleBtn = $('<span class="atlas-toggle-btn" style="cursor:pointer; margin-right:8px; user-select:none; font-weight:bold; font-size:1.1em; color:#54595d;">›</span>');
             var $toggleBtn = $('<span class="atlas-toggle-btn" style="cursor:pointer; margin-left:8px; user-select:none; font-weight:bold; font-size:1.1em; color:#54595d;">›</span>');
              
              
             // Injeta à esquerda
             // Injeta DEPOIS do texto (à direita)
             $mainAtlasLi.prepend($toggleBtn);  
             $mainAtlasLi.append($toggleBtn);  


             // 4. Evento do clique
             // 4. Evento do clique
Line 52: Line 52:
                 $('.atlas-submenu').toggleClass('is-open');
                 $('.atlas-submenu').toggleClass('is-open');
                  
                  
                // Alterna entre o chevron para a direita (›) e para baixo (˅)
                 if ($(this).text() === '›') {
                 if ($(this).text() === '›') {
                     $(this).text('˅'); // Igual ao formato de image_4a7113.png
                     $(this).text('˅');
                 } else {
                 } else {
                     $(this).text('›');
                     $(this).text('›');