Reputation: 3
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..?
Upvotes: 0
Views: 773
Reputation: 4855
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.
Upvotes: 1