title: Change background color of a div temporarily on click and then set to a different color
body: <p>Another noobie question. Trying to create a smartphone app using html, css, js and phonegap build. When the user taps a button or image I'd like to change the div background color from white to yellow, then play a short sound clip and then set the background color to say a pale yellow. </p>
  
  <p>I will have dozens of these Divs and all have a class assigned. Some will have a class .formal, others .informal and others .spanish. So far I can get it to play the sound only. I've tried adapting other solutions I've seen but the background color won't change. I think I need to identify which instance of the class was clicked, then change only that bg color then play the sound and finally change the bg color to light yellow. I have removed some code for clarity below.</p>
  
  <p>Thanks for any assistance you can provide me.</p>
  
  <p>Here's the html for a sample div</p>
  
  <pre><code>&lt;div class="formal"&gt;
    &lt;a href="#" onclick="playAudio('/android_asset/www/test.mp3');"&gt;Play ay caramba&lt;/a&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>And here's the "playAudio" js</p>
  
  <pre><code>function playAudio(src) {
    // Change bg color for the div to yellow here
    if (my_media == null) {
      // Create Media object from src
      my_media = new Media(src, onSuccess, onError);
    } // else play current audio
    // Play audio
    my_media.play();
    // change background color to light yellow here  
  }
  </code></pre>