changed getElementId to query selector because getelementId is a global method
This commit is contained in:
parent
1f37fda94f
commit
36aa29dd95
1 changed files with 5 additions and 5 deletions
|
@ -59,11 +59,11 @@ template.innerHTML = `
|
|||
.sidenav {padding-top: 15px;}
|
||||
.sidenav a {font-size: 18px;}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
/* the div block has an id and class so that its targeted by the styles
|
||||
and the component underneath */
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
<div id="mySidenav" class="sidenav">
|
||||
|
||||
|
@ -100,8 +100,8 @@ class ProfileSideBar extends HTMLElement {
|
|||
constructor() { // the constructor function initiates the new side bar
|
||||
super()
|
||||
this.appendChild(template.content.cloneNode(true))
|
||||
this.sidenav = this.getElementById("#mySidenav");
|
||||
this.openBtn = this.getElementById("#openBtn");
|
||||
this.sidenav = this.querySelector("#mySidenav");
|
||||
this.openBtn = this.querySelector("#openBtn");
|
||||
this.closeBtn = this.querySelector(".closeBtn");
|
||||
this.mainContent = document.getElementById("main");
|
||||
|
||||
|
|
Loading…
Reference in a new issue