usually (proper coding) javascript goes in the head. So give that a try.