title: Update multiple divs with jquery efficiently
body: <p>jquery noob here. </p>
  
  <p>I have a question for pros and people with jquery experience. I created this script, but I'm struggling with making it more efficient. Anyway, the idea is that I have multiple entries on HTML page that come from MYSQL database via PHP. </p>
  
  <p>So, </p>
  
  <p>A - A2</p>
  
  <p>B - B2</p>
  
  <p>C - C2</p>
  
  <p>No, A,B and C are static. It's just being read from the database. And A2,B2,C2 are dynamic elements that are updated every 10 seconds. In the current form I have multiple copies of javascript for each entry, which is extremely inefficient. At around 100 entries, my CPU spikes to 20-40% usage. </p>
  
  <p>The script is below:</p>
  
  <pre><code>&lt;script&gt;
  $(function() { 
  var refreshId = setInterval(function()
  {
  $('#UpdateDiv&lt;?php echo $entry; ?&gt;').load('live.php?entry=&lt;?php echo $entry; ?&gt;').fadeIn("slow");
   }, 10000);
  });
  &lt;/script&gt;
  &lt;?PHP
  echo '&lt;div id="UpdateDiv'.$entry.'"&gt;&lt;/div&gt;';
  ?&gt;
  </code></pre>
  
  <p>Thank you!</p>