Fold and unfold a section in js
async function fold_switch(id){
let section = jQuery("#" + id);
let visibility = section.css("visibility");
if (visibility === "hidden"){
unfold(section);
} else {
fold(section);
}
}
async function fold(section){
section.animate({
visibility : "hidden",
height: "toggle"
}, 500, function(){
});
}
async function unfold(section){
section.animate({
visibility : "visible",
height: "toggle"
}, 500, function(){
});
}