$(window).load(function() { function yellow() { //blah } this.yellow()