title: How to get AJAX response every N seconds
body: <p>I want to request this AJAX response every 10 seconds for the results</p>
  
  <pre><code>function show() {
      var ele = document.getElementById("ping");
      if (ele.style.display == "none") {
          ele.style.display = "block";
      }
      jQuery.ajax({
          type: "POST",
          url: "checkit.php",
          cache: false,
          success: function (response) {
              if (response == 1) {
                  alert("Success");
              }
          }
      });
  }
  </code></pre>