Just a quick question, I’m following the practice of keeping all Javascript files at the bottom of the document before the closing body. However I want to call a function in the body, which would appear before the JS include, and thus fails.
Is there anyway to get this function to work without moving the files into the head?
Cheers!
yes you can wrap your function with
but probably this solution is better if you can modify the bottom part of your page:
Stop paying your jQuery tax