Usage
Dimming a section
Any element can be dimmed using a dimmer.
Showing a specific dimmer
If a dimmer is already included on the page, instead of calling dimmer on the section you would like to dim, you can can invoke behaviors directly on the dimmer.
Types
Content Dimmer
A dimmer can display content
Dog Photos


Your poodle photo uploaded successfully!
Your poodle photo uploaded successfully!
Page Dimmer
A dimmer can be formatted to be fixed to the page
Dimmer
A dimmer can exist on its own without defining content that it dims
Dog Photos


States
Active
An active dimmer will dim its parent container
Disabled
A disabled dimmer cannot be activated
Variations
Dimmer
Simple Dimmer
A dimmer can be controlled without javascript
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.
Inverted Dimmer
A dimmer can be formatted to have its colors inverted
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.
Behavior
Display
You can display a dimmer by either invoking dimmer show on a section or a dimmer itself. If you choose to dim a dimmable section, a dimmer will automatically be created.
Settings
Popup Settings | ||
---|---|---|
closable | true | Whether clicking on the dimmer should close it automatically |
duration | 500 | Duration of dimming animation. |
Callbacks | ||
---|---|---|
onInit | None | Callback after a dimmer html is generated. |
onShow | None | Callback after a dimmer section is shown. |
onHide | None | Callback after a dimmer section is hidden. |
UI Module Settings | ||
---|---|---|
Name | Dimmer | Name used in debug logs |
debug | True | Provides standard debug output to console |
performance | False | Provides standard debug output to console |
verbose | False | Provides ancillary debug output to console |
namespace | dimmer | Event namespace. Makes sure module teardown does not effect other events attached to an element. |
errors |
errors : {
method : 'The method you called is not defined.'
}
|