title: Refresh a div with php data every 10 seconds using jQuery
body: <p>Am trying to refresh data stored in a div every 10 seconds using jQuery.</p>
  
  <p>My HTML code is:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;head&gt;
  &lt;title&gt;Untitled Document&lt;/title&gt;
  
  &lt;script src="http://code.jquery.com/jquery-latest.js"&gt;&lt;/script&gt;
  
  &lt;script&gt;
      $(document).ready(function(){
          setInterval(function() {
              $("#latestData").load("getLatestData.php #latestData");
          }, 10000);
      });
  
  &lt;/script&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
      &lt;div id = "latestData"&gt;
  
      &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>And the PHP code I am using (temporarily as I know this won't change due to the same "data"):</p>
  
  <pre><code>&lt;?php
  
      echo "test";
  
  ?&gt;
  </code></pre>
  
  <p>However, it isn't even showing "test" on the html page.. could anyone suggest where I have gone wrong?</p>
  
  <p>Many thanks</p>