-
Notifications
You must be signed in to change notification settings - Fork 44
/
script.js
59 lines (54 loc) · 1.75 KB
/
script.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
57
58
59
function sendMail(params){
var tempParams = {
from_name: document.getElementById("fromName").value,
email_sender: document.getElementById("emailSender").value,
subject_sender: document.getElementById("subjectSender").value,
message_sender: document.getElementById("message").value,
};
emailjs.send('{{SERVICE ID}}','{{TEMPLATE ID}}',tempParams)
.then(function(res){
Swal.fire({
position: 'center',
icon: 'success',
title: 'Mail Sent Successfully!',
showConfirmButton: false,
timer: 1500,
});
});
}
$(document).ready(function () {
$(window).scroll(function () {
if (this.scrollY > 20) {
$(".navbar").addClass("sticky");
} else {
$(".navbar").removeClass("sticky");
}
});
$('.menu-btn').click(function(){
$('.navbar .menu').toggleClass("active");
$('.menu-btn i').toggleClass("active");
});
// typing animation script
var typed = new Typed(".typing",{
strings: ["Your Skill","Your Hobby","Your Passion","Your Proficiency"],
typeSpeed: 100,
backSpeed: 60,
loop: true,
fadeOut: true,
});
var typed = new Typed(".typing-2",{
strings: ["Your Skill","Your Hobby","Your Passion","Your Proficiency"],
typeSpeed: 100,
backSpeed: 60,
loop: true,
});
});
// Scroll to top button script
const btnScrollToTop = document.querySelector("#btnScrollToTop");
btnScrollToTop.addEventListener("click", function(){
window.scrollTo({
top: 0,
left: 0,
behavior: "smooth"
});
});