0

I'm trying to build something out of potomak's jquery-instagram js code and I'm using it as is.. here is the code:

and here is how I'm calling it (the second one with the "more" button..)

could someone please tell me how to insert a auto refresh every X seconds to the photostream..?

4

1 回答 1

1

Try something like:

function hipsterPictures() {
  var clientId = 'xxx';
  var loading = '<div class="loading">Loading...</div>';

  $(".instagram.tag").html(loading).instagram({
    hash: 'hipster',
    show: 5,
    clientId: clientId,
    onComplete: function() {
      $(".instagram.tag .loading").remove();
    }
  });
}

hipsterPictures();

setInterval(function() {
  hipsterPictures();
}, 10000);

See demo.

于 2012-08-05T18:25:39.903 回答