title: Repeat jQuery ajax call
body: <p>How to repeat jQuery ajax call every 10 seconds?</p>
  
  <pre><code>$(document).ready(function() {
      $.ajax({    
          type: "GET",    
          url: "newstitle.php",   
          data: "user=success",    
          success: function(msg) {
              $(msg).appendTo("#edix");    
          }  
      });
  </code></pre>
  
  <p>I've tried to wrap the $.ajax with a function and to call the function with setInterval</p>
  
  <pre><code>$(document).ready(function() {
      function ajaxd() { 
          $.ajax({
              type: "GET",
              url: "newstitle.php",
              data: "user=success",
              success: function(msg) {
                  $(msg).appendTo("#edix");
              }
          });
      }
      setInterval("ajaxd()",10000);
  });
  </code></pre>
  
  <p>But it says "ajaxd is not defined"</p>