<!DOCTYPE html>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
<style type="text/css">
.hide .circle{
display: none;
}
.hide .show{
display: inline-block;
}
</style>
<script src="https://cdn.polyfill.io/v1/polyfill.js?Element.prototype.closest"></script>
<script>
window.addEventListener("DOMContentLoaded", function() {
var body = document.querySelector("body");
body.addEventListener("click", function(event) {
var target = event.target;
if (target.closest(".circle")) {
body.classList.add("hide");
target.classList.add("show")
}
})
});
</script>
</head>
<body>
<button class="circle p" >Predators</button>
<button class="circle s" >Shrubs</button>
<button class="circle d" >Donate</button>
<button class="circle t" >Trees</button>
<button class="circle h" >Hebivores</button>
<button class="circle v" >Vacancies</button>
<button class="circle f" >Flowers</button>
<button class="circle w" >Workers</button>
<button class="circle i" >Info</button>
</body>
</html>