The best cure for gigantic pages, is to not use gigantic pages. If you start off with a more succinct page then use ajax to bring in more data when needed, I think you will find it easier to maintain.
Any element, that you exists later on in a page, needs to be referenced in a ready block.
- $(function(){
- // ready block
- }
The <title> is usually before the <script>s, but not always. If it is before the current <script> your code would work. If it is after you need to use a ready block.
JΛ̊KE