Table of contents
- 1 Constructors
- 2 Methods
- 2.1 InstallScripts() : String
- 2.2 Appear(String elementId) : String
- 2.3 Fade(String elementId) : String
- 2.4 Puff(String elementId) : String
- 2.5 DropOut(String elementId) : String
- 2.6 Shake(String elementId) : String
- 2.7 SwitchOff(String elementId) : String
- 2.8 BlindUp(String elementId) : String
- 2.9 BlindDown(String elementId) : String
- 2.10 SlideUp(String elementId) : String
- 2.11 SlideDown(String elementId) : String
Effects2Helper API Document
Exposes the effect script from Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
Constructors
Effects2Helper()
Initializes a new instance of the Castle.MonoRail.Framework.Helpers.Effects2Helper class.
Methods
InstallScripts() : String
Renders a Javascript library inside a single script tag.
Appear(String elementId) : String
Make an element appear. If the element was previously set to display:none; inside the style attribute of the element, the effect will automatically show the element.
Microsoft Internet Explorer can only set opacity on elements that have a 'layout'. To let an element have a layout, you must set some CSS positional properties, like 'width' or 'height'.
| Parameter | Description |
|---|---|
| elementId |
Fade(String elementId) : String
Makes an element fade away and takes it out of the document flow at the end of the effect by setting the CSS display property to false.
Works safely with most HTML block elements (like DIV and LI). Microsoft Internet Explorer can only set opacity on elements that have a 'layout'. To let an element have a layout, you must set some CSS positional properties, like 'width' or 'height'.
| Parameter | Description |
|---|---|
| elementId |
Puff(String elementId) : String
Gives the illusion of the element puffing away (like a in a cloud of smoke).
Works safely with most HTML block elements (like DIV and LI).
| Parameter | Description |
|---|---|
| elementId |
DropOut(String elementId) : String
Makes the element drop and fade out at the same time.
Works safely with most HTML block elements (like DIV and LI).
| Parameter | Description |
|---|---|
| elementId |
Shake(String elementId) : String
Moves the element slightly to the left, then to the right, repeatedly.
Works safely with most HTML block elements (like DIV and LI).
| Parameter | Description |
|---|---|
| elementId |
SwitchOff(String elementId) : String
Gives the illusion of a TV-style switch off.
Works safely with most HTML block elements (like DIV and LI).
| Parameter | Description |
|---|---|
| elementId |
BlindUp(String elementId) : String
This pair of effects simulates a window blind, where the contents of the affected elements stay in place.
Works safely with most HTML block elements (like DIV and LI), except table rows, table bodies and table heads.
| Parameter | Description |
|---|---|
| elementId |
BlindDown(String elementId) : String
This pair of effects simulates a window blind, where the contents of the affected elements stay in place.
Works safely with most HTML block elements (like DIV and LI), except table rows, table bodies and table heads.
| Parameter | Description |
|---|---|
| elementId |
SlideUp(String elementId) : String
This pair of effects simulates a window blind, where the contents of the affected elements scroll up and down accordingly.
You must include a second DIV element, wrapping the contents of the outer DIV. So, if you call new Effect.SlideDown('x'), your element must look like this:
<div id="x"><div>contents</div></div>
Because of a bug in Internet Explorer 6 (overflow not correctly hidden), an additional wrapper div is needed if you want to use these effects on absolutely positionend elements (wrapper is the absolutely positioned element, x has position:relative; set; ):
<div id="wrapper"> <div id="x"><div>contents</div></div> </div>Works only on block elements.
| Parameter | Description |
|---|---|
| elementId |
SlideDown(String elementId) : String
This pair of effects simulates a window blind, where the contents of the affected elements scroll up and down accordingly.
You must include a second DIV element, wrapping the contents of the outer DIV. So, if you call new Effect.SlideDown('x'), your element must look like this:
<div id="x"><div>contents</div></div>
Because of a bug in Internet Explorer 6 (overflow not correctly hidden), an additional wrapper div is needed if you want to use these effects on absolutely positionend elements (wrapper is the absolutely positioned element, x has position:relative; set; ):
<div id="wrapper"> <div id="x"><div>contents</div></div> </div>Works only on block elements.
| Parameter | Description |
|---|---|
| elementId |