Advertisement
lgdelai

Untitled

Jul 28th, 2022
1,426
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     // Adicione na ordem: Botão a monitorar o clique, Atributo que possui a classe que define o botão como ativo, A classe que define o botão como ativo.
  2.     var btns = [
  3.         [".inside-navigation button","#mobile-header","toggled"], // Botão Menu.
  4.         [".inside-navigation span.search-item",".inside-navigation span.search-item","active"], // Botão Busca.
  5.     ];
  6.  
  7.     document.querySelector(".main-navigation").onclick = function(){
  8.         for ( var i1 = 0; j < btns.length; j++ ){
  9.             alert("Posicao loop: "+j+" - \nConteudo array: "+btns[j][0]+" - "+btns[j][1]+" - "+btns[j][2]);
  10.             if ( btns[j][1].classList.contains(btns[j][2]) ){
  11.                 limpaHistorico_f(document.querySelector(btns[j][1]), btns[j][2]);
  12.             }
  13.         }
  14.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement