When in the init of the plugin there is this...
if( !data ) {
/* Settings Extraction */
$.extend(s, defaults, options);
/* Initialize Code */
/* Data Storage */
var YoPlugin = $('<div />', {
text : $this.attr('title')
});
$(this).data('YoPlugin', {
target : $this,
myInternalFunction: myInternalFunction,
settings : $.extend({}, s),
YoPlugin : YoPlugin
});
data = $this.data('YoPlugin');
}
You can expose the internal functions like myInternalFunction has demonstrated.
Getting into the object from an event called on say $('body') leaves 'this' unusably as the body, so...
var multiSel = $('.YoPlugin');
var singleSel = multiSel[0]; //or other way to select the singleton or specific plugin enhanced target
var pluginDataObj = $(singleSel).data('YoPlugin');
var func = pluginDataObj['myInternalFunction'];
func();
I suppose adding a link as an external plugin reference is better
ie like init: is declared in the plugin
or similar routes via
$.fn.YoPlugin.myInternalFunction
Anyway this set of snippets exposes a night of R&D to explore and help understand whatzwhat a lir bir betta.
Also you definitely need to read all that you can absorb over here...
http://alexsexton.com/blog/2010/02/using-inheritance-patterns-to-organize-large-jquery-applications/