-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathscript.js
More file actions
25 lines (19 loc) · 728 Bytes
/
script.js
File metadata and controls
25 lines (19 loc) · 728 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/* ANIMAION DE CAMBIO DE COLOR DE HEADER */
window.addEventListener("scroll", function(){
var header = document.querySelector("header");
header.classList.toggle("abajo",window.scrollY>0);
})
/* FUNCION DE ABRIR Y CERRAR EL MENU HAMBURGUESA */
const ul = document.querySelector("#nav__lista");
const abrir = document.querySelector("#abrir");
const cerrar = document.querySelector("#cerrar");
abrir.addEventListener("click", () => {
ul .classList.add("visible");
})
cerrar.addEventListener("click", () => {
ul .classList.remove("visible");
})
/* ALERT AL ENVIAR EL FORMULARIO */
function mialerta() {
alert("Gracias por confiar en ACERCATECH. Nos pondremos en contacto contigo lo antes posible.");
}