jQuery Template Plugin

Author Name 0.0.1 (changelog) © Digital Fusion 2012, MIT

This is a jQuery plugin template. We use this template to quickly create our own plugins, which have a standard interface, and several standardised methods like 'options' to set the plugin options on the fly.

Contents

Getting Started

Here is the simplest possible implementation:

$('.selector').plugintemplate();

Here is some basic html you might use for your plugin:

<div></div>

Demos

Configuration Properties

PropertyDefaultDescription
conf1defaultA configuration option.

Config Option #1

You can use this option to configure the plugin.

$('.selector').plugintemplate({'conf1':'option'});

You should change this example to something relevant for your plugin.

Events

EventParametersDetails
event1Event, Index, ElementAn event that will be triggered when the plugin does something.

Event #1

This event will be triggered by the plugin.

$('.selector').plugintemplate().bind('event1',function( event, index, heading ){ /* Do something */ });

You should change this example to something relevant for your plugin.

Methods

MethodReturn ValueDescription
.list( 'option', [ Object ] )
.list( 'option', [ String, String ] )
jQuery
String
Takes a config object, or config string/value and applies the configuration option to the calendar.
.list( 'version', [ Object ] )StringReturns the version number of the currently installed list plugin.
.list( 'destroy' )jQueryRemoves the list from the targeted element, and returns the element to its pre-initialisation state.

Compatibility

This plugin has been tested, and verified working in the following browsers with JavaScript enabled.

jQuery Browser Compatibility