I want to add a class active to the element go_back_right
when both inputs with classes search_box_name
and search_box_id
have any value. I have tried referencing to the answers that are already on this platform, but I had no luck, as I'm new to js. Any help?
.go_back_right:active {
background-color: rgba(255, 0, 0, 0.05);
animation: status 4s ease forwards;
}
<div class="search_box_container">
<input class="search_box_name" id="search_bar username" for="username" name="username" type="text">
<input class="search_box_id" id="search_bar roomNamehtml" name="room" type="text">
</div>