I need assistance with changing the background color using JavaScript. Specifically, I want to change the color of the background property that is located within .diagnosis-kit-inner .nav-tabs .nav-item.active:after. Can someone provide guidance on this? Thank you.
function modifyColor() {
var targetElement = document.querySelector(".diagnosis-kit-inner .nav-tabs .nav-item.active:after");
targetElement.style.backgroundColor = 'blue';
}
.diagnosis-kit-inner .nav-tabs .nav-item.active:after {
background-color: white;
}
<div class="diagnosis-kit-inner ">
<ul class="nav-tabs">
<li class="nav-item">
</li>
</ul>
</div>
<a href="#" onclick="modifyColor()">Change Color</a>