title: Ajax Request, automatically receive data every 30 seconds (with a number of users using the website simultaneously)
body: <p>I have ajax request below - where it will get a number of pledges (tiles) by users in which when there's a pledge, the tile will flip and show:</p>
  
  <pre><code>var reveal = 0;
  $.ajax({
  type: 'GET',
  dataType: "json",
  url: '/Services/getpledge.ashx',
  success: function (data) {
    if (data.status === "Success") {
      $.each(data.Pledges, function (i, v) {
        if (typeof v.TileID !== 'undefined') {
          jQuery('.square-container div[data-id=' + v.TileID + ']').find('.front div').removeClass('box1').addClass('box3');
          jQuery('.square-container div[data-id=' + v.TileID + ']').parent().addClass('complete');
          jQuery('.square-container div[data-id=' + v.TileID + ']').attr('data-content', v.PledgeContent);
          jQuery('.square-container div[data-id=' + v.TileID + ']').attr('data-smoke', v.isSmoker);
          jQuery('.square-container div[data-id=' + v.TileID + ']').attr('data-fb_uid', v.FBID);
          if (v.Lastname != null)
          jQuery('.square-container div[data-id=' + v.TileID + ']').attr('data-name', v.Firstname + ' ' + v.Lastname);
          else
          jQuery('.square-container div[data-id=' + v.TileID + ']').attr('data-name', v.Firstname);
        }
        reveal += 1;
      });
      //reveal = data.Pledges.length;
      //console.log(data.Pledges.length + ' ' + reveal);
      $('.changeMe').text(reveal + '/' + number_square);
    }
  },
  error: function () {
    console.log('An error has occured, please refresh page and try again');
  }
  });
  </code></pre>
  
  <p>On the day of the launch, there will be a number of users using the website simultaneously, so I was wondering how can I make sure the request is done automatically - every 30 seconds so the page always updated. </p>