Putting scripts at the end of the page

1 message Options
Embed this post
Permalink
Rick

Putting scripts at the end of the page

Reply Threaded More More options
Print post
Permalink
I'm not sure whether or not I can do this...

I'm trying to put all my external javascripts at the end of the page, to load them after everything else has loaded.

But I have a situation (due to include files) where I need the shadowbox init code half way up the page.

So in essence I have this:


window.onload = function() { Shadowbox.init(); }    
...
...
...
<script type="text/javascript" src="/js/jquery.js"></script>
<script type="text/javascript" src="/shadowbox/shadowbox.js"></script>
</body>

I've done this with other scripts without a problem but absolutely no joy with shadowbox. Is this possible or not?