This dog has some things going for it. Its pretty cute and looks like it'd be fun to cuddle up with.
Types
Shape
A shape has multiple sides of arbitrary content. Only one is visible
This side is visible.
This side is not visible.
This side is not visible.
Examples
Interactive
Shape
Flip
Shape with Content
$('.dog.shape')
.eq(0)
.shape('flip over')
.end()
.eq(1)
.shape('flip left')
;
Getting Started
Initializing a shape
$('.shape')
.shape()
;
Transitions automatically assume next side is the next sibling (or first if last element)
$('.shape')
.shape('flip up')
;
To manually set the next side to appear use a selector or jQuery object
$('.shape')
.shape('set next side', '.second')
.shape('flip up')
;
Any internal method can be invoked programmatically
$('.shape')
.shape('repaint')
;
Defaults
Shape Settings | ||
---|---|---|
duration | 1000ms | Duration of animation (javascript only). To modify animation duration for css simply modify the css property transition-duration. |
easing | easeInOutQuad | Easing equation for animation (javascript only). To modify the easing for css simply modify the css property transition-easing |
selector |
{
shape : '.shape',
side : '.side'
}
|
Object containing selectors used by module. |
className |
{
css : 'css',
animating : 'animating',
hidden : 'hidden',
active : 'active'
}
|
Object containing class names used by module. |
Callbacks | ||
---|---|---|
beforeChange | None | Callback before side is changed. This context is the new side. |
onChange | None | Callback after side is changed. This context is new side. |
UI Module Settings | ||
---|---|---|
Name | Shape | 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 | shape | Event namespace. Makes sure module teardown does not effect other events attached to an element. |
errors |
{
side : 'You tried to switch to a side that does not exist.',
method : 'The method you called is not defined'
}
|