So I got this code, I figured out how to delete one element with the checkbox checked but if I try to delete the second div it won't let me? Does anyone have a solution to it?
HTML
<div id="product-space">
<div id="product"> <input type="checkbox" id="delete-checkbox">
<p> JVC200123 <br> Acme DISC <br> 1.00 $ <br> Size: 700 MB</p>
</div>
<div id="product"> <input type="checkbox" id="delete-checkbox">
<p> KRK201929 <br> Acme DISC <br> 1.00 $ <br> Size: 700 MB</p>
</div>
</div>
<button type="submit" name="button" value="enter" id="button" onclick="removeCheckedCheckboxes()">MASS DELETE</button>
JavaScript
function removeCheckedCheckboxes() {
var checkBox = document.getElementById("delete-checkbox");
var box = document.getElementById("product");
if (checkBox.checked == true) {
box.style.display = "none";
}
}