Try loading as AMD module or fall back to default loading
The actual plugin class
Default options for the widget. Redefine this dictionary in extending classes to specify default options. These options can be overriden using 'data-' attributes, or by passing them directly to the constructor.
The default constructor calls the initialize method with the specified method, sets the element, and binds events to the elements. Remember to call super in subclasses if you want to maintain behaviour.
element
Object: the element the plugin is applied tooptions
Object: the options for the plugin initializationreturns the element
Wrapper method for the accessibility layer.
Add ARIA attributes to the elements according to the following references:
Handle key press according to AOL's XXX style guide.
Attach keyboard key listeners for typical ARIA-compatible keys.
elements
Object or Object[]: the elements to add the key
listener tons
String: an optional namespace to add to the eventTODO: use e.keyIdentifier for better targetting than key codes
Handle tab key press.
e
Object: the event that was triggeredHandle enter key press.
e
Object: the event that was triggeredHandle space key press.
e
Object: the event that was triggeredHandle escape key press.
e
Object: the event that was triggeredHandle left key press.
e
Object: the event that was triggeredHandle right key press.
e
Object: the event that was triggeredHandle up key press.
e
Object: the event that was triggeredHandle down key press.
e
Object: the event that was triggeredHandle page up key press.
e
Object: the event that was triggeredHandle page down key press.
e
Object: the event that was triggeredHandle home key press.
e
Object: the event that was triggeredHandle end key press.
e
Object: the event that was triggeredHandle asterisk key press.
e
Object: the event that was triggeredHandle key press on numbers.
e
Object: the event that was triggeredHandle key press on letters.
e
Object: the event that was triggeredInstall the plugin into the JS library. Remember to call install in the plugin class as:
Plugin.install([pluginName],[namespace],[initFunction])
pluginName
String: the name of the pluginnamespace
String: an optional namespace for the plugininit
Function: some initialization code to execute after the plugin
was loadedInstall as JS library function
Iterate over all elements of the selector and add the plugin
Load default options
Override with options specfied as 'data-'' attributes
Override with options specified in the direct call
Do not create a new instance if one exists
Call internal instance methods
Re-initialize the plugin with new options
Create a new instance
Attach the plugin to the data attribute of the element
Add a class corresponding to the plugin name
Add a listener for jQuery's remove event
Call plugin specific cleanup
Add the class to the library
AbstractWidget
The
AbstractWidget
class provides an abstraction for JS library widgets.author: Julien Ramboz
version: 1.0
references: jQuery CoffeeScript plugin requires: UI_Lib