How can I call a function of jQuery plugin from inside of the same object. I use exact suggested solution http://docs.jquery.com/Plugins/Authoring#Plugin_Methods. From external code I can call this way:
$('div').tooltip("myMethod", an_attr);
But how can I call the same from inside especially form event when 'this' is not the object of plugin.
var methods = {
var $this = $(this);
init : function( options ) {
$this.click(function(){
$this.fn2("myMethod", an_attr); //is it right way?
});
},
fn2 : function() {
//but how can I call the myMethod. here ?
},
myMethod : function() {...
thisin$(), it's already a jQuery object.thisshould be and what you want to call, in what order?