// define closure
(function() {
// declare shared function in a closure
function commonFunc() {
// common code here
}
// define first plugin method
jQuery.fn.plugin1 = function() {
// do stuff
// ....
// use common function
commonFunc();
};
// define other plugin method
jQuery.fn.plugin2 = function() {
// do different stuff
// ....
// use common function
commonFunc();
};
})();