-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
48 lines (40 loc) · 1.68 KB
/
index.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
$(document).ready(function() {
function showContainer() {
$(".container").stop(true, true).slideDown();
}
// Show researchText and hide others
$("#researchButton").click(function() {
showContainer();
$("#researchText").stop(true, true).slideDown();
$("#education, #communityWork, #researchWork,#certs").stop(true, true).slideUp();
});
// Show education and hide others
$("#eduButton").click(function() {
showContainer();
$("#education").stop(true, true).slideDown();
$("#researchText, #communityWork, #researchWork,#certs").stop(true, true).slideUp();
});
// Show communityWork and hide others
$("#community").click(function() {
showContainer();
$("#communityWork").stop(true, true).slideDown();
$("#researchText, #education, #researchWork,#certs").stop(true, true).slideUp();
});
// Show researchWork and hide others
$("#research").click(function() {
showContainer();
$("#researchWork").stop(true, true).slideDown();
$("#researchText, #education, #communityWork,#certs").stop(true, true).slideUp();
});
$("#onlineWork").click(function() {
showContainer();
$("#certs").stop(true, true).slideDown();
$("#researchText, #education, #communityWork,#researchWork").stop(true, true).slideUp();
});
$(document).on('click', function(event){
// Check if the click is not on the container, buttons, or any of their children
if (!$(event.target).closest('.container, .button-container button').length) {
$('.container').stop(true, true).slideUp();
}
});
});