-
Notifications
You must be signed in to change notification settings - Fork 0
/
my_jquery.js
84 lines (77 loc) · 3.09 KB
/
my_jquery.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
jQuery(document).ready(function($){
$("a[href='#home']").click(function(){
$('.active-content').fadeOut(function(){
$(".deco_box").fadeIn()
});
$('.active-content').removeClass("active-content");
$('.active').removeClass("active");
$("#home").addClass("active-content");
$("a[href='#home']").addClass("active");
});
$("a[href='#cv']").click(function(){
var T = document.getElementById("cv");
$(".active-content").fadeOut(function(){
T.style.display = "block";
$("#cv").fadeIn();
});
$('.active-content').removeClass("active-content");
$('.active').removeClass("active");
$("#cv").addClass("active-content");
$("a[href='#cv']").addClass("active");
});
$("a[href='#about-me']").click(function(){
var T = document.getElementById("about-me");
$(".active-content").fadeOut(function(){
T.style.display = "block";
$("#about-me").fadeIn();
});
$('.active-content').removeClass("active-content");
$('.active').removeClass("active");
$("#about-me").addClass("active-content");
$("a[href='#about-me']").addClass("active");
});
$("a[href='#research']").click(function(){
var T = document.getElementById("research");
$(".active-content").fadeOut(function(){
T.style.display = "block";
$("#research").fadeIn();
});
$('.active-content').removeClass("active-content");
$('.active').removeClass("active");
$("#research").addClass("active-content");
$("a[href='#research']").addClass("active");
});
$("a[href='#projects']").click(function(){
var T = document.getElementById("projects");
$(".active-content").fadeOut(function(){
T.style.display = "block";
$("#projects").fadeIn();
});
$('.active-content').removeClass("active-content");
$('.active').removeClass("active");
$("#projects").addClass("active-content");
$("a[href='#projects']").addClass("active");
});
$("a[href='#personal']").click(function(){
var T = document.getElementById("personal");
$(".active-content").fadeOut(function(){
T.style.display = "block";
$("#personal").fadeIn();
});
$('.active-content').removeClass("active-content");
$('.active').removeClass("active");
$("#personal").addClass("active-content");
$("a[href='#personal']").addClass("active");
});
$("a[href='#contact']").click(function(){
var T = document.getElementById("contact");
$(".active-content").fadeOut(function(){
T.style.display = "block";
$("#contact").fadeIn();
});
$('.active-content').removeClass("active-content");
$('.active').removeClass("active");
$("#contact").addClass("active-content");
$("a[href='#contact']").addClass("active");
});
});