I'm facing problem using setInterval
function in my website. I've a small section of my code below. I'm basically trying to increase the count by 1 and print it on screen.
<div id="test"></div>
<script>
var count = 0;
setInterval(function() {
document.getElementById('test').innerHTML=count;
count++;
}, 1000);
</script>
Edit: I'm not using jquery
in the code as it should be quite clear from above. However the problem I'm facing here is when I open the html in opera mini in mobile device, the count it shows is either 1 to 3 or 1 to 4. It does not continue. I've an external url. Please open the url in a mobile device and see the problem. http://fundoophoto.com/raman/Test/