title: How to add class to an element when both inputs have value
body: <p>I want to add a class active to the element <code>go_back_right</code> when both inputs with classes <code>search_box_name</code> and <code>search_box_id</code> 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?</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.go_back_right:active {
    background-color: rgba(255, 0, 0, 0.05);
    animation: status 4s ease forwards;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="search_box_container"&gt;
    &lt;input class="search_box_name" id="search_bar username" for="username" name="username" type="text"&gt;
    &lt;input class="search_box_id" id="search_bar roomNamehtml" name="room" type="text"&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>