From 36aa29dd95bd2b74bd070a28420c4fba2ce0b50a Mon Sep 17 00:00:00 2001 From: Miguel Date: Wed, 11 Sep 2024 22:16:19 -0400 Subject: [PATCH] changed getElementId to query selector because getelementId is a global method --- frontend/ts/profile.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/frontend/ts/profile.js b/frontend/ts/profile.js index 1eae883..4b45a43 100644 --- a/frontend/ts/profile.js +++ b/frontend/ts/profile.js @@ -59,11 +59,11 @@ template.innerHTML = ` .sidenav {padding-top: 15px;} .sidenav a {font-size: 18px;} } - +/* the div block has an id and class so that its targeted by the styles +and the component underneath */ -/* the div block has an id and class so that its targeted by the styles -and the component underneath*/ +
@@ -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");