i need to create a menu in angular and javascript . i need this menu show and hide with button .
i write code and i show it here : Demo
i need to when click button , the start-item slideup with animation and when i click that button again start-item slidedown with animation .
how can i do this with jquery ???
showHideMenu(is: boolean) {
var elem = document.querySelector('.start-Itms');
if (this.isOpen) {
console.log(this.isOpen)
elem.classList.remove('hidden');
elem.classList.add('visible');
this.isOpen = false;
} else {
console.log(this.isOpen)
elem.classList.remove('visible');
elem.classList.add('hidden');
this.isOpen = true;
}
}
HTML :
<div class="container-fluid p-0 content">
<div class="startMenu p-0 col-md-12 col-sm-12 col-lg-12 col-xl-12">
<div class="start p-0" (click)="showHideMenu(isOpen)">
<img src="../../../assets/img/Icon/windows-10-solo-logo.png">
</div>
<div class="col-md-32 col-sm-32 col-lg-32 col-xl-32">
<input>
</div>
</div>
<div class="start-Itms" id="start-Itms">
</div>