Expose the plugin base.
- Source:
Methods
(static) createPlugin(superClassopt, overrides)
Create a new collection plugin.
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
superClass |
string |
<optional> |
'JQPlugin' | The name of the parent class to inherit from. |
overrides |
object | The property/function overrides for the new class. See JQPlugin for the base functionality. |
- Source:
Example
$.JQPlugin.createPlugin({ // Define the plugin
name: 'tabs',
defaultOptions: {selectedClass: 'selected'},
_initSettings: function(elem, options) { return {...}; },
_postAttach: function(elem, inst) { ... }
});
$('selector').tabs(); // And instantiate it