-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpersonal.js
50 lines (33 loc) · 1.12 KB
/
personal.js
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
const header=document.querySelector("header");
window.addEventListener("scroll",function(){
header.classList.toggle("sticky",window.scrollY>100)
});
const menuIcon = document.getElementById('menu-icon');
const navList = document.querySelector('.navlist');
// Add a click event listener to the menu icon
menuIcon.addEventListener('click', () => {
// Toggle the 'activee' class on the nav list to show/hide it
menuIcon.classList.toggle("bx-x");
navList.classList.toggle('activee');
});
function sendMail(){
var params = {
from_name : document.getElementById("fullname").value ,
email_id : document.getElementById("email_id"). value ,
message : document.getElementById("message").value
}
emailjs.send("service_pu9848r", "template_jur2gdd", params)
.then(
message => {
if(message != "OK"){
swal("Successful", "You clicked the button!", "success");
}
else{
swal("Error", "You clicked the button!", "Error");
}
}
)
.then(function(res){
alert("Success! " + res.status);
})
}