$(document).ready(function() { // will run after DOM creation - "OnLoad" }); function func_name(){ //will run when you call this function }