title: Fire jquery based on mutation on same class with multiple instances
body: <p>I've applied the mutationobserver to determine a class inclusion within an element (.wq_singleResultWrapper) and as such add another class to a different element (#prizeentry)</p>
  
  <p>The code i'm working with is essentially a "personality" quiz with 4 results at the end. Each within a wrapper (.wq_singleResultWrapper). </p>
  
  <p>IF the result is the first result the jquery is processed fine. However will not function if any of the other results show.</p>
  
  <pre><code>var $div = document.getElementsByClassName(
      "wq_singleResultWrapper"
  );
  
  var observer = new MutationObserver(function(mutations) {
    mutations.forEach(function(mutation) {
      if (mutation.attributeName === "class") {
        var attributeValue = $(mutation.target).prop(mutation.attributeName);
        $('#prizeentry').addClass("visable");
      }
    });
  });
  
  observer.observe($div[0], {
    attributes: true
  });
  </code></pre>
  
  <p><strong>So below is the following expected result:</strong> as you can see a class inclusion on the second div would trigger the addClass in the below div (as previously stated this would only work if the first div has the class inclusion.</p>
  
  <pre><code>&lt;div class="wq_singleResultWrapper"&gt;&lt;/div&gt;
  &lt;div class="wq_singleResultWrapper result"&gt;&lt;/div&gt;
  &lt;div class="wq_singleResultWrapper"&gt;&lt;/div&gt;
  &lt;div class="wq_singleResultWrapper"&gt;&lt;/div&gt;
  &lt;div id="prizeentry" class="visable"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>see following example 
  <a href="https://jsfiddle.net/2d8hb3n0/23/" rel="nofollow noreferrer">https://jsfiddle.net/2d8hb3n0/23/</a></p>
  
  <p>I am using the mutationobserver as i do not have access to the jquery thats adding the class inclusion.</p>