I have the following JavaScript pattern for creating a simple plugin:
(function(window, document, $) {
function method_1(){
}
function method_2{}
{
}
})(window, document, jQuery);
I want to have the ability to access my plugin and plugin methods in the following way:
myplugin.method_1();
myplugin.method_2();
How do I update my existing plugin pattern to enable this?!
NOTE: It has to maintain a self-executing format i.e. no variable declarations.