title: Trying to make div background change color when 2 ids are true
body: <p>I am trying to make each div's  background change color when 2 ids exist. it is not changing the color. I cannot figure out what I am doing wrong. I am brand new to javascript. I have an embedded stylesheet and dont know if the javascript will override the css. 
  Also, I know some PHP and want to 'echo' the variables throughout the program so that I can see what the string value is in order to debug my own code. what is the easiest way to do this? </p>
  
  <pre><code>function drop(ev){
      ev.preventDefault();
      var image = ev.dataTransfer.getData("content");
      ev.target.appendChild(document.getElementById(image));
      var mydiv = '';
      for (var i=0;i&lt;9;i++)
      {
          if ($('#target'.i).find('#answer'.i).length == 1)
          {
              mydiv = document.getElementById('target'+i);
              mydiv.style.backgroundColor = '#00CC00';
          }
          else
          {
              mydiv = document.getElementById('target'+i);
              mydiv.style.backgroundColor = '#FF0000';
          }
      }
  }
  </code></pre>