If you're wanting to keep all your JS in the head, I'm not sure if it can be done, at least if it starts in the page and isn't created dynamically, if it starts in the page and you don't reall care about where your JS is, you could put a script element at the end of it.
I was going to say try this:
Code:
<div id="story03">
<script type="text/javascript">
document.getElementById ("story03").onload = function () {
//Do stuff when it loads...
}
</script>
<!-- Div contents go HERE! --!>
</div>
But it didn't work and I don't really know why. So just do:
Code:
<div id="story03">
<!-- Div contents go HERE! --!>
<script type="text/javascript">
//Do stuff when it loads...
</script>
</div>
I think that will work.
Bookmarks