-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
36 lines (30 loc) · 791 Bytes
/
script.js
File metadata and controls
36 lines (30 loc) · 791 Bytes
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
$(document).ready(function(){
$("#home-link").click(function(){
switchCards("#home", this);
});
$("#about-link").click(function(){
switchCards("#about", this);
});
$("#contact-link").click(function(){
switchCards("#contact", this);
});
$(".contact-inline").click(function(){
switchCards("#contact", "#contact-link");
});
$("#resume-link").click(function(){
switchCards("#resume", this);
});
function switchCards(id, tab){
if(!$(id).is(":visible")){
$("#right-column").children().each(function(){
if($(this).is(":visible")){
$(this).fadeOut(0);
}
});
$(id).fadeIn();
//persistent nav
$(".side-links").removeClass("active-tab");
$(tab).addClass("active-tab");
}
}
});