Transitions the height, opacity, padding, and margin (but not border) from and to their current height from and to zero, then sets display to none or block and resets the height, opacity, etc. back to their original values.
element - (mixed) A string of the id for an Element or an Element reference to reveal or hide.
options - (object, optional) a key/value object of options
Options
all the options passed along to Fx.Morph (transition, duration, etc.); (optional); PLUS
styles - (array) css properties to transition in addition to width/height; defaults to ['padding','border','margin']
transitionOpacity - (boolean) toggles the use of transitioning the opacity during the Reveal/Dissolve effect (this feature is not currently supported in IE)
mode - (string) "vertical", "horizontal", or "both" to describe how the element should slide in; defaults to "vertical"
heightOverride - (number) height to open to; overrides the default offsetHeight
widthOverride - (number) width to open to; overrides the default offsetWidth
display - (string) the property for the display style when your reveal the element. Defaults to block but could be, for instance, list-item, inline-block, etc.
opacity - (float) the opacity value for fading in an element; defaults to 1 but can be set to a number between zero and one to have the element fade in to a partially transparent state.
show - (function) The function to apply when the element is displayed.
hide - (function) The function to apply when the element is hidden. NOTE: the onComplete event occurs when the effect is complete, but before the element is set to display:none.
Transitions the height, opacity, padding, and margin (but not border) from their current height to zero, then sets display to none and resets the height, opacity, etc. back to their original values.
After the effect reveals the element, its display will be set block and its height or width to auto unless heightOverride and/or widthOverride (depending on the mode option) is specified.
Sets the display of the element to opacity: 0 and display: block, then transitions the height, opacity, padding, and margin (but not border) from zero to their proper height.
Note that either or both of these may be specified and in any order.
options - (object) The options object to pass to the "built-in" instance of Fx.Reveal.
destroy - (boolean) If (true) the element will be destroyed entirely after the effect (using Element.destroy), otherwise it will only be removed from the DOM (using Element.erase). Defaults to (false - i.e. erase).
Examples
$('myElement').nix(true); //destroy
$('myElement').nix(); //erase
$('myElement').nix({duration: 1000}); //dissolve over 1 second, then erase
$('myElement').nix({duration: 1000}, true); //dissolve over 1 second, then destroy