-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
111 lines (86 loc) · 3.14 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
$(document).ready(function(){
$('.object').click(function(){
$(this).children('.description').toggle(100);
});
$('.arrow-next').click(function(){
var currentSlide = $('.current-slide');
var nextSlide = currentSlide.next();
var currentDot = $('.current-dot');
var nextDot = currentDot.next();
//wrapped to last page, go back to first
if(nextSlide.length == 0){
nextSlide = $('.slide').first();
nextDot = $('.dot').first();
}
currentSlide.fadeOut(0).removeClass('current-slide');
nextSlide.fadeIn(200).addClass('current-slide');
currentDot.removeClass('current-dot');
nextDot.addClass('current-dot');
});
$('.arrow-prev').click(function(){
var currentSlide = $('.current-slide');
var prevSlide = currentSlide.prev();
var currentDot = $('.current-dot');
var prevDot = currentDot.prev();
//wrapped to first page, go back to last
if(prevSlide.length == 0){
prevSlide = $('.slide').last();
prevDot = $('.dot').last();
}
currentSlide.fadeOut(0).removeClass('current-slide');
prevSlide.fadeIn(200).addClass('current-slide');
currentDot.removeClass('current-dot');
prevDot.addClass('current-dot');
});
$('.select-menu').change(function(){
var value = $(this).val();
if(value == 'about'){
$('.current-slide').fadeOut(0).removeClass('current-slide');
$('.about').fadeIn(200).addClass('current-slide');
$('.current-dot').removeClass('current-dot');
$('.about-dot').addClass('current-dot');
}
if(value == 'education'){
$('.current-slide').fadeOut(0).removeClass('current-slide');
$('.education').fadeIn(200).addClass('current-slide');
$('.current-dot').removeClass('current-dot');
$('.education-dot').addClass('current-dot');
}
if(value == 'work'){
$('.current-slide').fadeOut(0).removeClass('current-slide');
$('.work').fadeIn(200).addClass('current-slide');
$('.current-dot').removeClass('current-dot');
$('.work-dot').addClass('current-dot');
}
if(value == 'skills'){
$('.current-slide').fadeOut(0).removeClass('current-slide');
$('.skills').fadeIn(200).addClass('current-slide');
$('.current-dot').removeClass('current-dot');
$('.skills-dot').addClass('current-dot');
}
});
$('#about').click(function(){
$('.current-slide').fadeOut(0).removeClass('current-slide');
$('.about').fadeIn(200).addClass('current-slide');
$('.current-dot').removeClass('current-dot');
$('.about-dot').addClass('current-dot');
});
$('#education').click(function(){
$('.current-slide').fadeOut(0).removeClass('current-slide');
$('.education').fadeIn(200).addClass('current-slide');
$('.current-dot').removeClass('current-dot');
$('.education-dot').addClass('current-dot');
});
$('#work').click(function(){
$('.current-slide').fadeOut(0).removeClass('current-slide');
$('.work').fadeIn(200).addClass('current-slide');
$('.current-dot').removeClass('current-dot');
$('.experience-dot').addClass('current-dot');
});
$('#skills').click(function(){
$('.current-slide').fadeOut(0).removeClass('current-slide');
$('.skills').fadeIn(200).addClass('current-slide');
$('.current-dot').removeClass('current-dot');
$('.skills-dot').addClass('current-dot');
});
});