-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.js
56 lines (50 loc) · 1.53 KB
/
app.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/*Pre loader Code Starts */
function loader(){
document.querySelector('.loader-container').classList.add('fade-out');
}
window.addEventListener("load",function(){
setInterval(loader,1500);
});
/*Pre loader ends */
/*Hamburger Code Starts*/
const openMenu = document.querySelector("#menu");
const navbar = document.querySelector(".navbar");
const closeMenu =document.querySelector("#closeMenu");
openMenu.addEventListener("click",()=>
{
navbar.classList.toggle("nav-toggle");
openMenu.style.display="none";
closeMenu.style.display="block";
});
closeMenu.addEventListener("click",()=>
{
navbar.classList.toggle("nav-toggle");
openMenu.style.display="block";
closeMenu.style.display="none";
});
/*Hamburger Code Ends*/
/*Typing Text Code Starts*/
var typed = new Typed(".typing-text", {
strings: ["Competitive Programming", "Full Stack Web Development"],
loop: true,
typeSpeed: 50,
backSpeed: 25,
backDelay: 500,
});
/*Typing Text Code Ends*/
/*Sending Email*/
var submit = document.querySelector(".contact .button-area button");
submit.addEventListener("click",(event)=>
{
event.preventDefault();
var params={
from_name:document.getElementById("fullName").value,
email_id:document.getElementById("email_id").value,
message:document.getElementById("message").value,
}
emailjs.send("service_ttdipjf","template_4hnur9v",params)
.then(function (res)
{
alert("Success! "+res.status);
});
});