-
Notifications
You must be signed in to change notification settings - Fork 1
/
app.js
66 lines (56 loc) · 1.9 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
57
58
59
60
61
62
63
64
65
66
let res = document.getElementById('resume_logo');
let add = document.getElementById('address');
let loc = document.getElementById('location');
let ph = document.getElementById('phone');
let num = document.getElementById('number');
let email = document.getElementById('email');
let mail = document.getElementById('mail');
let page_2 = document.getElementById('page_2');
res.addEventListener('mousemove', function() {
res.classList.remove('human-heart');
res.classList.add('up-down');
});
res.addEventListener('mouseleave', function() {
res.classList.remove('up-down');
res.classList.add('human-heart');
});
add.addEventListener('mousemove', function() {
loc.classList.add('animated');
loc.classList.add('rubberBand');
});
add.addEventListener('mouseleave', function() {
loc.classList.remove('animated');
loc.classList.remove('rubberBand');
});
ph.addEventListener('mousemove', function() {
num.classList.add("animate");
});
ph.addEventListener('mouseleave', function() {
num.classList.remove("animate");
});
email.addEventListener('mousemove', function() {
mail.classList.add('animated');
mail.classList.add('wobble');
});
email.addEventListener('mouseleave', function() {
mail.classList.remove('animated');
mail.classList.remove('wobble');
});
$(document).ready(function(){
$('.name-light').hide();
$('#page_2').hide();
$("a").on('click', function(event) {
$('.name-dark').removeClass( "mtop" );
$('.name-light').removeClass( "mtop" );
$('#page_2').show();
$('html, body').animate({scrollTop: $('#page_2').offset().top -100 }, 'slow');
});
});
$('.switch').change(function(){
$('.name-dark').toggle();
$('.name-light').toggle();
$('.title-dark').toggleClass( "title-light" );
$('.icon-gradient-dark').toggleClass( "icon-gradient-light" );
$('.background-dark').toggleClass( "background-light" );
$('.resume-dark').toggleClass( "resume-light" );
});