title: auto refresh a div not working
body: <p>I'm trying to develop a div that is automatically updated with your own content as it will be to show a real ping a website on canvas.<br>
  I have the following script:</p>
  
  <pre><code>&lt;script&gt; 
  var auto_refresh = setInterval(
  function()
  {
  $('#divcanvas').fadeOut('slow').load('teste.php #divcanvas').fadeIn("slow");
  }, 1000);
  &lt;/script&gt;
  </code></pre>
  
  <p>In my markup have:</p>
  
  <pre><code>&lt;div style="width:30%"&gt;
      &lt;div id="divcanvas"&gt;
          &lt;canvas id="canvas" height="450" width="600"&gt;&lt;/canvas&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>And in test.php have:</p>
  
  <pre><code>&lt;?php 
  include_once "ping/pingdomain.php";
  require_once "ping/config.php";
  $ms = pingDomain('www.adhenrique.com.br');
  $hora = date("H:i:s", time());
  mysql_query("insert into ping (resposta, horario) values ('$ms', '$hora')");
  $sql = mysql_query("SELECT * FROM PING order by id DESC LIMIT 0,15");
  ?&gt;
  &lt;head&gt;
  &lt;title&gt;Documento sem título&lt;/title&gt;
  &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"&gt;
      &lt;script src="includes/js/chart.js"&gt;&lt;/script&gt;
          &lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"&gt;&lt;/script&gt;
      &lt;/head&gt;
      &lt;body&gt;
      &lt;canvas id="canvas" height="450" width="600"&gt;&lt;/canvas&gt;
  &lt;?php
  $pingreposta = array();
  $pinghorario = array();
  while($valor = mysql_fetch_assoc($sql))
  {
      extract($valor);
      $pinghorario[] = $valor['horario'];
      $pingreposta[] = $valor['resposta'];
  }
  ?&gt;
      &lt;script&gt;
          var lineChartData = {
              labels :&lt;?php echo '[' .'"'. implode('","', $pinghorario) .'"'. ']'; ?&gt;
              ,
              datasets : [
                  {
                      label: "My First dataset",
                      fillColor : "rgba(220,220,220,0.2)",
                      strokeColor : "rgba(220,220,220,1)",
                      pointColor : "rgba(220,220,220,1)",
                      pointStrokeColor : "#fff",
                      pointHighlightFill : "#fff",
                      pointHighlightStroke : "rgba(220,220,220,1)",
                      data : &lt;?php echo '[' . implode(',', $pingreposta) . ']'; ?&gt;
  
                  }
              ]
  
          }
  
      window.onload = function(){
          var ctx = document.getElementById("canvas").getContext("2d");
          window.myLine = new Chart(ctx).Line(lineChartData, {
              responsive: true
          });
      }
  
  
      &lt;/script&gt;
  
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>But when i open the index.php, it does not show the canvas. But if i open the test.php data it shows. That is, the code of canvas is correct.<br>
  Where is my mistake?</p>