-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathanimation.js
31 lines (28 loc) · 1.1 KB
/
animation.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
function openNav() {
if ($("#SidebarLinks").is(":visible") === true) {
closeNav();
return;
}
document.getElementById("mySidenav").style.width = "350px";
document.getElementById("Header").style.left = "350px";
document.getElementById("myclosebtn").style.animation = "rotation 0.5s cubic-bezier(.45, 0, .55, 1) 1";
document.getElementById("myclosebtn").style.transform = "rotate(90deg) translate(-12px, -12px)";
$( "#SidebarLinks" ).show();
}
function closeNav() {
document.getElementById("mySidenav").style.width = "100px";
document.getElementById("Header").style.left = "100px";
document.getElementById("myclosebtn").style.animation = "rotationReverse 0.5s cubic-bezier(.45, 0, .55, 1) 1";
document.getElementById("myclosebtn").style.transform = "rotate(0deg) translate(0px, 0px)";
$("#SidebarLinks").hide("fast");
}
function openProvinces() {
if ($("#SidebarLinks2").is(":visible") === true) {
closeProvinces();
return;
}
$( "#SidebarLinks2" ).show("fast");
}
function closeProvinces() {
$("#SidebarLinks2").hide("fast");
}