function functionName() { // Our function } $(document).ready(function(){ //functionName });