title: Change class of multiple elements
body: <p>I want to change class of all element which are on the right of the hovered (including) and on the left of the hovered.</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;div id="head_1" class="left_head active"&gt;&lt;/div&gt;
  &lt;div id="head_2" class="middle_head active"&gt;&lt;/div&gt;
  &lt;div id="head_3" class="middle_head active"&gt;&lt;/div&gt;
  &lt;div id="head_4" class="middle_head inactive"&gt;&lt;/div&gt;
  &lt;div id="head_5" class="middle_head inactive"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>This is how it looks like:</p>
  
  <p><a href="https://i.stack.imgur.com/PT3t8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PT3t8.png" alt="The look of the situation"></a></p>
  
  <p>Now, when I hover over third head I want all heads on the left to change class from inactive to active, and all of them on the right from active to inactive (if they were previously active)</p>