Newbie question; placement of jquery code

Newbie question; placement of jquery code

Is there any reason why I  can't place Jquery code pretty much anywhere in the page or does it have to go in the header area? I ask because I've tried it, obviously, and i works in Firfefox but not in chrome. Basically I'm wrapping $(document).ready(function(){ .... }  in a function, which is declared in the header then called further down the page in the body. I'm doing this with good reason but if it's not going to work then I need to find a way around it.

Any help appreciated.

K.