This is my own choice of jQuery plugin pattern which mainly consists of collection method, its initialization, defaults management and public API definition. Static method and custom pseudo selector definition also included.
Since I am a big fan of modular JavaScript I had added UMD (Universal Module Definition) version of jQuery plugin template that works with AMD (Asynchronous Module Definition) and browser globals. You can read more about UMD patterns on its repository page.
Replace any instance of word plugin
with your actual plugin name
.
Copyright (c) 2013 Anton Yefremov
Free to use and abuse under the MIT license.
http://opensource.org/licenses/MIT