I have multiple javasripts that needs using body onload event
It should be simple solution for that - just add all events in row like this:
<body onload="showContent();
randomImages();
placeIt();
showIt();
preloadImgs();
initialize()">
But of course life isnt so simple..
fore some reason some scripts needs to be FIRST in row. So if I put showContent();
first, randomimages wont execute and vice versa.
I also tried replace onload event with script like this
if ( typeof window.addEventListener != "undefined" )
window.addEventListener( "load", showContent, false );
else if ( typeof window.attachEvent != "undefined" ) {
window.attachEvent( "onload", showContent );
}
else {
if ( window.onload != null ) {
var oldOnload = window.onload;
window.onload = function ( e ) {
oldOnload( e );
showContent();
};
}
else
window.onload = showContent;
}
So far I have no solution for this conflict. Does somebody have good idea?