a lot of similar questions have already been answered but nothing seems to work for me, so I want to highlight the element on click of the navigation bar(8k), and then remove it after a few seconds, I just can't figure out how to do it without refreshing the whole page. Is there any way to refresh the div only and or it can be done without refresh? (beginner here). Thanks
Javascript
function dance() {
document.getElementById("c4").style.boxShadow= "0 4px 8px 0 rgba(218, 51, 119, 0.4), 0 6px 20px 0 rgba(0, 0, 0, 0.19)";
}
HTML
<img src="../pics/-vine-3404474.jpg" id="c4">
<div class="flex-nav" id="n1">
<a href="#" style="order:3">2k</a>
<a href="#" style="order:2">4k</a>
<a href="#" style="order:4">1080p</a>
<a href="#C2" style="order:1" onclick="dance()">8k</a>
</div>