Is it possible to apply the "active" class to the element go_back_right
only when both inputs with classes search_box_name
and search_box_id
have content in them? I've tried looking for solutions on this platform, but being new to JavaScript, I couldn't find a suitable answer. Any assistance would be greatly appreciated.
.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>