Untitled
unknown
plain_text
2 years ago
671 B
7
Indexable
<button class="showhidebutton" onclick="showhidefunction(this)">Click to Show Solution</button>
<style>
.showhidebutton {
background: #ffffff !important;
font-weight: 600;
font-size: 15px;
color: green;
}
.showhidebutton:hover {
text-decoration: none;
color: green;
}
#solutionhide {
display:none;
}
.solutionshow {
display:block !important;
}
</style>
<script>
function showhidefunction(button) {
var element = document.getElementById("solutionhide");
element.classList.toggle("solutionshow");
button.textContent = element.classList.contains("solutionshow") ? "Click to Hide Solution" : "Click to Show Solution";
}
</script>Editor is loading...
Leave a Comment