i want call function every 2 seconds. tried setinterval(myfunction, 2000); , worked, but:
i have tappable elements in page.
$('div.square').tappable(function () { ... etc.
as tap on tappable element, stops. myfunction not called anymore. if setinterval has stopped.
i don't understand execution flow, i'm new javascript , don't understand happening.
this code i'm working with: https://github.com/jeffehobbs/html5-bingo/blob/master/js/script.js
how should execute function there on regular intervals, (to show bingo numbers being drawn) , able tap bingo squares?
are sure myfunction isn't called anymore? try create console log in myfunction see if still called.
function myfunction() { console.log("i called"); }
Comments
Post a Comment