Answer the question
In order to leave comments, you need to log in
How to make setinterval every 10 seconds?
how to attach setinterval to this?
<script type="text/javascript">
VK.init({
apiId: 5135424
});
VK.Api.call('status.get', {}, function(r) {
if(r.response) {
$('#statusjs').append(''+r.response.text+'')
}
});
</script>
Answer the question
In order to leave comments, you need to log in
var interval = setInterval(function(){
VK.Api.call('status.get', {}, function(r) {
if(r.response) {
$('#statusjs').append(''+r.response.text+'')
//если надо остановить
if(stop){
clearInterval(interval);
}
}
});
}, 10000);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question