new Responsiville.Drawers(options)
Creates and initialises the drawers.
Name | Type | Description |
---|---|---|
options |
Object | The initialisation options of the module. |
- License:
- Nevma Copyright (c) http://www.nevma.gr
Properties:
Name | Type | Description | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object | The options that define the object
behaviour.
Properties
|
Fires:
Extends
Members
-
staticResponsiville.Drawers.AUTO_RUN
-
Properties:
Name Type Description AUTO_RUN
boolean Controls whether this module should run by default, without the developer calling it, using its default settings. Defaults to true. -
staticResponsiville.Drawers.defaults
-
Properties:
Name Type Description defaults
Object Default values for this module settings.
Methods
-
staticResponsiville.Drawers.autoRun(){void}
-
Runs through the page and searches for elements that apply to the current module in order to apply it to them automatically. Useful for automatically creating elements with this module's behaviour just by setting up the predefined classes and data attributes in HTML elements of the page.
Returns:
Type Description void -
buttonClick(event)
-
Handles the drawers button click event. This button toggles the visibility of the panel element.
Name Type Description event
Event The user click event sent by the browser. -
closeElement($element)
-
Closes the given panel element.
Name Type Description $element
jQuery The panel element required to close. Fires:
-
disable(){void}
-
Disables the drawers.
Fires:
Returns:
Type Description void -
enable(){void}
-
Enables the drawers.
Fires:
Returns:
Type Description void -
openElement($element)
-
Opens the given panel element.
Name Type Description $element
jQuery The panel element required to open. Fires:
-
setupEvents(){void}
-
Sets up event handlers necessary for the object to function properly.
Returns:
Type Description void
Events
-
closed
-
Called after closing the element.
-
closing
-
Called before closing the element.
-
disabled
-
Called after the drawers has been disabled.
-
enabled
-
Called after the drawers has been enabled.
-
Called after the module has been initialised.
-
opened
-
Called after opening the element.
-
opening
-
Called before opening the element.