jquery - I have a setTimeout function and bug in my code -
i trying code giving me error , error not clear. please me error in code.
$("#sess").click(function(){ if(s == 0){ var temp = sl; while(sl != 0){ if(temp == sl){ settimeout(function(){ temp = sl--; }, 100); } $("#time").html(sl); //s=1; } }); }
looks have syntax error, moved );
code. try this:
$("#sess").click(function(){ if(s == 0){ var temp = sl; while(sl != 0){ if(temp == sl){ settimeout(function(){ temp = sl--; }, 100); } $("#time").html(sl); //s=1; } } });
Comments
Post a Comment