Widget functions within jQuery methods

Widget functions within jQuery methods

Hello,

I am currently developing a widget and was wondering if someone new a solution to this.

Basically I have declared a private method in my widget like so:

  1. _mymethod: function(){ //something cool },

I would like to call this method inside something like this: 

  1. $('#droppable').droppable({
  2.       drop: function(event, ui){
  3.             //Call method here
  4.       }
  5. });

However everything I try comes back as method is not defined or object has no method.

  1. this._mymethod();
  2. _mymethod();

etc

Any advice would be great..

Thanks..