jquery loading and setTimeout problems -


I am loading this page with .load () and timeout is 500, but when textera is focused, So I want the timeout to be changed to 5000000. This code is not working. Refresh the function () {var t = 500; $ ('#postholler'). Load ('postframe.php', function () {$ ("texture"). Focus (function () {var t = 5000000;}); setTimeout (refreshTable, t);}); }

You can not change the timeout by changing the variable used to specify that The time was when the time was over. You have to stop the timeout and start a new one at that time:

  function loadPost () {$ ('# postHolder'). Load ('postframe.php', function () ($ ("Textarea"). Focusin (function () {explicit timeout (timer); timer = set timeout (refresh, 5000000);}); tim timer = set timeout (Refresh, 500);});}    

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -