Posted By

mickel on 09/01/10


Tagged

javascript js


Versions (?)

JS Simple Lock


 / Published in: JavaScript
 

URL: http://pixeltango.com

  1. var lock = (function () {
  2. var lock = null;
  3. return function () {
  4. if (lock != null)
  5. return false;
  6.  
  7. lock = setTimeout(function () {
  8. lock = null;
  9. }, 300);
  10. return true;
  11. };
  12. })();

Report this snippet  

You need to login to post a comment.