Results 1 to 3 of 3
Jun 8, 2007, 14:43 #1
- Join Date
- Jul 2005
- 0 Post(s)
- 0 Thread(s)
JS in the head ... or body ... why not?
I've got a script I want to start using on my site, it's the son of suckerfish menu system. There is a bit of JS required, and altho it doesn't specify that it go in the "head" section I assume it must as most do ...
But my deal is this - I have a common menu include for the 100+ pages - I stuck the JS at the top of the include (include contains only html - no head tags) and the script works fine. This saves me having to insert the JS into all of those files. Yes, I'm a bit lazy at times.
My question is this: Why is most JS inserted between the head tags? I see that it will work in the body tag - so what is the advantage of the head tag placement? Should I bite the bullet and do the insertions - or will it be okay as is?