The Blind effect simulates a window blind that moves up or down to hide or reveal the element. This effect is similar to the Slide effect, but the contents stay in place.
You can only attach this effect to the following HTML elements: address, dd, div, dl, dt, form, h1, h2, h3, h4, h5, h6, p, ol, ul, li, applet, center, dir, menu, or pre.
The following table lists available options for the Blind effect.
Option |
Description |
---|---|
duration |
Duration of the effect in milliseconds. The default value is 1000. |
from |
Start size in % or pixels. The default value is 100% of the element’s original dimension. |
to |
End size in % or pixels. The default value is 0% of the element’s original dimension. |
useCSSBox |
Modifies the border, margin and padding proportionally to the element’s inner content box. Default value is false. |
toggle |
Lets you create a toggle effect. The default value is false. |
transition |
Determines the type of transition. The default is Spry.circleTransition. |
fps |
Determines the number of frames per second (fps) of the animation. The default is 60. |
setup |
Lets you define a function that is called before the effect begins, e.g., setup:function (element,effect){/* ... */}. |
finish |
Lets you define a function that is called after the effect finishes, e.g., finish:function (element,effect){/* ... */}. |
Sample code:
var effect = new Spry.Effect.Blind('targetID',{duration: 2000, from: "100%", to: "0%"}); |
effect.start(); |