Posted By

isholgueras on 08/24/10


Tagged

jquery


Versions (?)

"eternal" ajax-checking with jquery


 / Published in: JavaScript
 

For an ajax chat... or similar

  1. //I saw it in a Paul Irish's video
  2. //http://net.tutsplus.com/tutorials/javascript-ajax/10-things-i-learned-from-the-jquery-source/
  3.  
  4. //Similar to setInterval, but with more performance :P
  5.  
  6. (function loopAjaxFunction(){
  7.  
  8. doStuff();//We can stop here the loop... or not
  9.  
  10. $("#update").load("checkmsgs.php", function(){
  11. loopAjaxFunction();
  12. });
  13. })();

Report this snippet  

You need to login to post a comment.