Hi I have this javascript code which I would like to call the refresh method in my init function but I can't seems to be able to call it. What is the proper way of doing this?

PHP Code:
$.fn.plug = function() {

        
this.init = function( ) {
            
this.refresh()
        }

        
this.refresh = function( ) {
             
alert("call")
        } 
Thanks in advanced.