Plugin command
Use a jQuery plugin the same way as your other jKit commands with the help of this command.
Basic Usage (HTML)
data-jkit="[plugin:script=plugins/myplugin.js]"
Advanced Init (JavaScript)
$('#myelement').jKit('plugin', { 'script': 'plugins/myplugin.js' });
Options
Option | Values | Default | Description |
---|---|---|---|
script | String | The identifier of the registered plugin or the path to the plugin | |
option | String | The optional function parameter used to initialize the plugin |
Events
Event | Description |
---|---|
complete | Triggered after the plugin is loaded |
Examples
Hint plugin:
In this example we’re adding an input hint plugin and additionaly we set an option (hintClass) of that plugin:
Source:
<input name="hint" id="hint" title="My Hint Text" data-jkit="[plugin:script=hint;hintClass=hint]">
Max length:
And another example where we limit the length of the entered text:
Source:
<input name="tweet" id="tweet" data-jkit="[plugin:script=maxlength;maxCharacters=140]">
Replacements
There are currently no replacements for this command.
[ Learn more about replacements ]
Discussions
Do you have questions or do you want to suggest new features? Than head over to our new community:
[ jKit Community ]