/ Published in: JavaScript
Expand |
Embed | Plain Text
// addLoadEvent is Simon Willison's function that aloows for convenient // addition of multiple fuctions that are all supposed to be triggered // on window.onload event. // takes function name as the argument. e.g. addLoadEvent(doPopups); function addLoadEvent(func) { var oldonload = window.onload; if (typeof window.onload != 'function') { window.onload = func; } else { window.onload = function() { oldonload(); func(); } } }
You need to login to post a comment.
