Image Flickers when reloading on Ajax request. Can it be solved with Jquery?

Image Flickers when reloading on Ajax request. Can it be solved with Jquery?

I have a page that displays graph image which is refreshed every second via ajax call.  The problem I am having is that image flickers every time it refreshes.  I was told that I could solve it with jquery library but I am new to it and have no idea where to start.  Can someone look at my code and let me know if this is a quick fix or point me in the right direction?

Here is my code 
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US" xml:lang="en-US">
  3. <head profile="http://gmpg.org/xfn/11">
  4. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  5. <title>Tire Change Report</title>
  6. <link rel="stylesheet" href="something.css" type="text/css" media="screen" />
  7. <script src="http://code.jquery.com/jquery-latest.js"></script>
  8. <script type="text/javascript">
  9.  $(document).ready(function() {
  10.      var url = 'graph.php?random='+ Math.random();
  11.      document.getElementById('graph').innerHTML = '<img src="' + url + '" />';
  12.      
  13. var refreshId = setInterval(function() {
  14.      document.getElementById('graph').innerHTML = '<img src="' + url + '" />';
  15.    }, 1000);
  16.    $.ajaxSetup({ cache: false });
  17. });
  18. </script>
  19. </head>
  20. <body>
  21. <div id="graph-title">
  22.    <h1>Current Tire Change Report</h1>
  23.     </div>
  24. <div id="graph"></div>

  25. </body>
  26. </html>