title: Get the location of a class element in the class array from hovering or clicking the object
body: <p>I am currently making a project where I have different characters and as you hover over each of them information is displayed about them. While I may be able to get passed this problem with IDs, I was wondering if there was any way to obtain the location of an object in a class using given information (like using indexOf).</p>
  
  <pre><code>&lt;div class="people"&gt; 
  &lt;div&gt;Steve&lt;/div&gt;
  &lt;div&gt;James&lt;/div&gt;
  &lt;div&gt;Mike&lt;/div&gt;`
  &lt;/div&gt;
  
  &lt;div class="peopleInfo"&gt;
  &lt;div&gt;Likes pizza&lt;/div&gt;
  &lt;div&gt;Is a very good chef&lt;/div&gt;
  &lt;div&gt;Has a family to look after&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>The text in .peopleInfo is hidden and appears when I hover over each person(I have that part sorted out). Each is synced up chronologically with each person (i.e Steve Likes Pizza).
  Is there a way that I could get the index of Steve in .people by hovering over him, in order to produce the text "Likes pizza"?</p>