I am trying to access plugin through this, in order to refer to methods added later down in the chain.
$.fn.test = function(){
console.log(this);
}
but this refers to the elements I have used to call the plugin, and not the plugin itself.
How can I access the plugin, and thus any methods attached to it?
Use
$(this)if you want the jQuery object.You can also try this to add plugin to jQuery.