javascript - clearInterval in if doesn't work -
i have this:
function myfunction() { var testvar; if(txt == "maybe") { txt == "no"; testvar = setinterval(function(){ zrobto() }, 1000); } else if(txt == "no") { txt == "maybe"; clearinterval(testvar); } }
when clearinterval
isn't in if code working, wanna have in if. possible?
Comments
Post a Comment