Display = "none" Not WORKING - Answered

HTML:

<p class="codeLink" onclick="showCode()">Line 83</p>


<div class="authCodeLine">83</div>
<div class="authCode"><code>&nbsp;&nbsp;<|-- Auth Code Is 651273 --> </code></div>

CSS:

.authCode {
  color: #49fb35;
  background-color: black;
  position: relative;
  top: 100px;
  display: none;
}

.authCodeLine {
  color: #49fb35;
  background-color: black;
  position: relative;
  top: 100px;
  display: none;
}

JS:

function showCode() {
  document.getElementById("authCodeLine").style.display = "inline";
  document.getElementById("authCode").style.display = "inline";
}

Oh! I forgot to add the id=“” selector, thank you so much.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.