-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathscript.js
More file actions
51 lines (41 loc) · 1.72 KB
/
script.js
File metadata and controls
51 lines (41 loc) · 1.72 KB
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
function showPanel(panel){
$("#logo-wrapper").css({"height": "0", "padding": "0"}).fadeOut(400);
$(".section").css({"height": "100%"});
$("#sections-wrapper").css("height", "10%");
$(".panel-section").hide();
$(panel).show();
}
$(document).ready(function(){
setTimeout(function(){$(".section").removeAttr("style")}, 10);
$(document).on("click", "#about.inactive", function(){
showPanel("#about-panel");
$(".section").removeClass("active").addClass("inactive");
$("#about").removeClass("inactive").addClass("active");
});
$(document).on("click", "#projects.inactive", function(){
showPanel("#projects-panel");
$(".section").removeClass("active").addClass("inactive");
$("#projects").removeClass("inactive").addClass("active");
});
$(document).on("click", "#tpt.inactive", function(){
showPanel("#tpt-panel");
$(".section").removeClass("active").addClass("inactive");
$("#tpt").removeClass("inactive").addClass("active");
});
$(document).on("click", "#scripts.inactive", function(){
showPanel("#scripts-panel");
$(".section").removeClass("active").addClass("inactive");
$("#scripts").removeClass("inactive").addClass("active");
});
$(document).on("click", "#changelog.inactive", function(){
showPanel("#changelog-panel");
$(".section").removeClass("active").addClass("inactive");
$("#changelog").removeClass("inactive").addClass("active");
});
$(document).on("click", ".active", function(){
$("#logo-wrapper").fadeIn(400).css({"height": "", "padding": ""});
$(".section").css({"height": ""}).removeClass("active").addClass("inactive");
$("#sections-wrapper").css("height", "");
setTimeout(function(){$(".panel-section").hide()}, 400);
});
});