Is there a way to make the VarDisk2
element disappear when the width of VarDisk1
exceeds 70?
<script>
var VarDisk1 = document.querySelector("Disk1");
var VarDisk2 = document.getElementsByClassName("Disk2");
let width = VarDisk1.offsetWidth;
if(width > 70)
VarDisk2.style.display = "none";
</script>