title: Change Text Color According to Image
body: <p>I'm trying to figure out a way to change the color of some text via jQuery. </p>
  
  <p>Essentially, I have a div with a random loading image. Over that I have div containing some text.</p>
  
  <p>What I would like to happen is when a specific image is loaded it swaps the text color from white to black. </p>
  
  <p>Anyone point me in the right direction?</p>
  
  <p><strong>For clarification:</strong></p>
  
  <p>My question is how do I find which image has been loaded into a div then execute a function based on thet result. For example:</p>
  
  <p>I have 2 image, which are randomly loaded into a  via backstretch.js. I also have another div with some text overlaid on-top of the image:</p>
  
  <pre><code>&lt;!-- my images --&gt;
  image-1.jpg
  image-2.jpg
  
  &lt;!-- Layout --&gt;
  &lt;div id="imageDIV"&gt;&lt;/div&gt;
  &lt;div id="textDiv"&gt;&lt;p&gt;hello&lt;/p&gt;&lt;/div&gt;
  </code></pre>
  
  <p>Once page has loaded and an image has been loaded into the div. Check which one it is then do somthing. So</p>
  
  <pre><code>if { 
     image is image-1.jpg then add a class to #textDiv
  }
  
  else if { 
     image is image-2.jpg add this class instead
  }
  </code></pre>
  
  <p>Thanks</p>