title: Input text in field change background color of div
body: <p>I want to have the div background color change colors only when there is text in the input field and when there is no text there the color doesn't change or it reverts back to the original color. Here is my code so far and it doesn't work.</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      $(document).ready(function () {
          $('#inputDatabaseName').change(function () { 
              $(this).parent().find('#colorchange').css('background-color','#ff0000');
              $(this).css('background-color','#ff0000');
      });
  &lt;/script&gt;
  
  &lt;/head&gt;
  &lt;body&gt;
      &lt;form id="form1" runat="server"&gt;
      &lt;div id="colorchange"&gt;
          &lt;input id="inputDatabaseName"&gt;
          &lt;table id="searchResults"&gt;&lt;tr&gt;&lt;td&gt;empty&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
      &lt;/div&gt;
      &lt;/form&gt;
  &lt;/body&gt;
  </code></pre>