Answers for "navbar toggle without bootstrap in angular"

0

navbar toggle without bootstrap in angular

<button class="btn btn-primary btn-lg dropdown-toggle" type="button"
                  (click)="toggleDropdown($event)"
                   aria-haspopup="true" aria-expanded="false">
  
  toggleDropdown(event) {



    var childersns = event.target.parentElement.parentElement.childNodes;
    // var parent = event.target.parentElement.parentElement;

    console.log(parent);

    for (let i = 0; i < childersns.length; i++) {
      console.log(childersns[i])
       if (childersns[i].nodeName == 'DIV') {
         childersns[i].classList.toggle('hide')
        childersns[i].classList.toggle('show')
       }
    }


  }
Posted by: Guest on September-13-2021

Code answers related to "navbar toggle without bootstrap in angular"

Code answers related to "Javascript"

Browse Popular Code Answers by Language