-
Notifications
You must be signed in to change notification settings - Fork 0
/
src.js
62 lines (51 loc) · 1.79 KB
/
src.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
60
61
62
// $(document).ready(function () {
// $(window).scroll(function () {
// if($(window).scrollTop() > 300) {
// $('i').css({
// "opacity":"1","pointer-events":"auto"
// })
// };
// else{
// $('i').css({
// "opacity":"1","pointer-events":"auto"
// });
// }
// });
// $('i').click(fuction(){
// $('html').animate({scrollTop:0},500)
// });
// });
// multi text
const typed = new Typed('.multiple-text', {
strings: ['full-stack Development', 'front-end devlopment','web-designing'],
typeSpeed: 100,
backSpeed: 50,
backDelay: 200,
loop: true
});
// goofle sheet contact form
const scriptURL = 'https://script.google.com/macros/s/AKfycbyDZQadguLf6_Vek55aoa9p7D6LQdblS4-G_-73DxFK4yI1Vxv6bXEDCy7zDYWPtYOm/exec'
const form = document.forms['submit-to-google-sheet']
const msg= document.getElementById("msg")
form.addEventListener('submit', e => {
e.preventDefault()
fetch(scriptURL, { method: 'POST', body: new FormData(form)})
.then(response =>
{
msg.innerHTML= "message sent successfully"
setTimeout(function(){
msg.innerHTML=""
},5000)
form.reset()
}
)
.catch(error => console.error('Error!', error.message))
});
// variable for side menu
var sidemenu= document.getElementById("sidemenu");
function openmenu(){
sidemenu.style.right= "0";
}
function closemenu(){
sidemenu.style.right= "-200px";
}