Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // 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.
- var btns = [
- [".inside-navigation button","#mobile-header","toggled"], // Botão Menu.
- [".inside-navigation span.search-item",".inside-navigation span.search-item","active"], // Botão Busca.
- ];
- document.querySelector(".main-navigation").onclick = function(){
- for ( var i1 = 0; j < btns.length; j++ ){
- alert("Posicao loop: "+j+" - \nConteudo array: "+btns[j][0]+" - "+btns[j][1]+" - "+btns[j][2]);
- if ( btns[j][1].classList.contains(btns[j][2]) ){
- limpaHistorico_f(document.querySelector(btns[j][1]), btns[j][2]);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement