Advertisement
Guest User

Untitled

a guest
Nov 26th, 2014
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. function afComplete(event){
  2.  
  3. if (window.AF_Queue.length == 0) {
  4. window.RunningAF = false;
  5. } else {
  6. var fn = window.AF_Queue.shift();
  7. fn();
  8. }
  9. return false;
  10. }
  11.  
  12. function runAf(af) {
  13. if (!window.RunningAF) {
  14. window.RunningAF = true;
  15. af();
  16.  
  17. } else {
  18. window.AF_Queue.push(af);
  19. }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement