js dom terms aren't very consistent

This commit is contained in:
Jacob Levine 2019-02-09 15:44:46 -06:00
parent 0f68468f14
commit 3abc50cf7a
2 changed files with 5 additions and 5 deletions

View File

@ -27,7 +27,7 @@
<h1 id="mainhead">TitanScout- Your Profile</h1>
<p id="status">Loading...</p>
<input type="button" name="Sign Out" value="Sign Out" onclick="signout();" id="signout" class="btn">
<input type="button" name="DelAcc" value="Delete Account" onclick="deleteAccount();" id="deleteacc" class="btm">
<input type="button" name="DelAcc" value="Delete Account" onclick="deleteAccount();" id="deleteacc" class="btn">
<h2>Profile info</h2>
<table id="profileupd">
<tr class="profupdopt">

View File

@ -3,8 +3,8 @@ function openNav() {
document.getElementById("mySidenav").style.width = "250px";
document.getElementById("main").style.marginLeft = "250px";
document.body.style.backgroundColor = "rgba(0,0,0,0.4)";
for (var i = 0; i < document.getElementsByClass("btn").length; i++) {
document.getElementsByClass("btn")[i].style.backgroundColor="rgba(0,0,0,.2)"
for (var i = 0; i < document.getElementsByClassName("btn").length; i++) {
document.getElementsByClassName("btn")[i].style.backgroundColor="rgba(0,0,0,.2)"
}
}
@ -13,8 +13,8 @@ function closeNav() {
document.getElementById("mySidenav").style.width = "0";
document.getElementById("main").style.marginLeft = "0";
document.body.style.backgroundColor = "white";
for (var i = 0; i < document.getElementsByClass("btn").length; i++) {
document.getElementsByClass("btn")[i].style.backgroundColor="buttonface"
for (var i = 0; i < document.getElementsByClassName("btn").length; i++) {
document.getElementsByClassName("btn")[i].style.backgroundColor="buttonface"
}
}