Is it possible to do this without using JQuery?
I would like a div to change its shadow color once I clicked on it, and when I click on it again it will change back to its original color. Here's the code: http://jsfiddle.net/kqv7x5f8/5/
var btn = document.getElementById("btn");
function toShadow() {
document.getElementById("btn").style.boxShadow = "5px 5px red"
}
#btn {
height: 20px;
border: 2px solid black;
box-shadow: 5px 5px black;
}
<div id="btn" onclick="toShadow">
click to change shadow; click again to change back
</div>
Thank you!