-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
30 lines (21 loc) · 840 Bytes
/
script.js
File metadata and controls
30 lines (21 loc) · 840 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
$(document).ready(function(){
$('.fa-bars').click(function(){
$(this).toggleClass('fa-times');
$('.navbar').toggleClass('nav-toggle');
});
$(window).on('load scroll',function(){
$('.fa-bars').removeClass('fa-times');
$('.navbar').removeClass('nav-toggle');
if($(window).scrollTop() > 30){
$('.header').css({'background':'#6C5CE7','box-shadow':'0 .2rem .5rem rgba(0,0,0,.4)'});
}else{
$('.header').css({'background':'none','box-shadow':'none'});
}
});
$('.accordion-header').click(function(){
$('.accordion .accordion-body').slideUp();
$(this).next('.accordion-body').slideDown();
$('.accordion .accordion-header span').text('+');
$(this).children('span').text('-');
})
});