Guest User

Untitled

a guest
Jan 19th, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. $(function(){
  2. //todo
  3. });
  4.  
  5. $(document).ready(function() {
  6. //todo
  7. });
  8.  
  9. $(window).load(function(){
  10.  
  11. //Do something after all onload fucntions.
  12.  
  13. });
  14.  
  15. var scripts_loaded = 0;
  16. var number_of_scripts = 5;
  17.  
  18. function everything_is_loaded() {
  19.  
  20. if(scripts_loaded == number_of_scripts) {
  21.  
  22. //do something
  23.  
  24.  
  25. // and clear interval
  26.  
  27. clearInterval(chk_scripts_loaded);
  28.  
  29. }
  30.  
  31. }
  32.  
  33. var chk_scripts_loaded = setInterval(function() {everything_is_loaded();}, 1000);
Add Comment
Please, Sign In to add comment