Skip to content

Instantly share code, notes, and snippets.

@barneycarroll
Created September 19, 2011 11:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save barneycarroll/1226302 to your computer and use it in GitHub Desktop.
Save barneycarroll/1226302 to your computer and use it in GitHub Desktop.
Stack window.onload functions
// Stack window.onload functions
function addLoad(func){
var old = window.onload;
func instanceof Function
&& (window.onload =
old instanceof Function
? function(){func();old()}
: func);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment