[Demo] CheckBox Click When Disabled

[Demo] CheckBox Click When Disabled

by dying_sakura

HTML

<body>
  <div id="first"><button> tangina mo
  </button>

  <button id="toggle">Hide THIRD div</button>
</body>

JavaScript

const targetDiv = document.getElementById("first");
const btn = document.getElementById("toggle");
btn.onclick = function () {
  if (targetDiv.style.display !== "none") {
    targetDiv.style.display = "none";
  } else {
    targetDiv.style.display = "block";
  }
};