var widget = function( options ) { this.variable = "asdasdasd"; this.load = function(){ alert( this.variable ); $.post( 'api.php', { id:'123123', cmd:'asdasdas' }, this.parse ) }; this.parse = function( data, status ){ console.log( 'data: ' ); console.log( data ); console.log( 'status' ); console.log( status ); console.log( this ); }; //$( this.parse ).bind( this ); } firstW = new widget();