jquery-plugin-template.js
/**
         * Init function for setting up this instance
         * The settings are cascaded in the following order:
         *  - the plugin defaults
         *  - the given options via jQuery-call
         *  - the element options via attribute
         *  (latest takes precedence)
         *
         * @param {Object} initOpts
         */
Init function for setting up this instance
The settings are cascaded in the following order:
- the plugin defaults
- the given options via jQuery-call
- the element options via attribute
(latest takes precedence)

@param {Object} initOpts
Init function for setting up this instance The settings are cascaded in the following order : - the plugin defaults - the given options via jQuery - call - the element options via attribute ( latest takes precedence ) @param { Object } initOpts
function init(initOpts) {
            var attrOptStr = $el.attr('data-' + PLUGIN_NAME);
            var attrOpts = attrOptStr ? $.parseJSON(attrOptStr) : {};
            opts = $.extend(opts, defOpts, initOpts, attrOpts);
            privateFunction();
            $el.on('click.' + PLUGIN_NAME, function () {
                staticFunction();
                self.publicFunction();
            });
        }
function init ( initOpts ) { var attrOptStr = $el . attr ( 'data-' + PLUGIN_NAME ) ; var attrOpts = attrOptStr ? $ . parseJSON ( attrOptStr ) : { } ; opts = $ . extend ( opts , defOpts , initOpts , attrOpts ) ; privateFunction ( ) ; $el . on ( 'click.' + PLUGIN_NAME , function ( ) { staticFunction ( ) ; self . publicFunction ( ) ; } ) ; }
Init function for setting up this instance
 The settings are cascaded in the following order:
  - the plugin defaults
  - the given options via jQuery-call
  - the element options via attribute
  (latest takes precedence)
Init function for setting up this instance The settings are cascaded in the following order : - the plugin defaults - the given options via jQuery - call - the element options via attribute ( latest takes precedence )
// Example: Use a private function // Example: Bind events // Example: Use static function // Example: Use public function