javascript setTimeout(); doesn't work on linux (firefox) -


i making animation, uses settimeout(); function in javascript. animation works on chrome, firefox, on smartphone. problem firefox on ubuntu.

console giving me error:

referenceerror: loop not defined @ file:///home/nigga/github/imgdrop/imgdrop.js:45 

the code:

function loop() {     regenerate();     animate();      settimeout("loop()", 1000/fps); } 

edit:

i tried @lol suggested, works on linux, doesnt work on windows (firefox , ie).

function loop() {     regenerate();     animate(); settimeout(function() {loop();}, 1000); } 

or

function loop()     {         regenerate();         animate();     settimeout(loop, 1000);     } 

Comments

Popular posts from this blog

c++ - How to add Crypto++ library to Qt project -

jQuery Mobile app not scrolling in Firefox -

How to use vim as editor in Matlab GUI -