You could achieve this design with something similar to the following. I have wrapped the plugin definition within a closure to keep PluginObj
from polluting the global namespace.
(function($) {
function PluginObj() {
// construct stuff
}
PluginObj.prototype.customFunctionCallWithinPlugin = function() {
// do stuff
};
$.fn.myPlugin = function() {
return new PluginObj();
};
})(jQuery);
The jQuery method returns a new object with the methods you define. This is a non-standard design for a jQuery plugin though, so if you plan to distribute it make sure it is thoroughly documented.