Fan

 

class

dom::Effect

sys::Obj
  dom::Effect

@js

Effect provides visual effects on a DOM element.

Slots

animateSource

native This animate(Str:Str map, Duration dur := 0ns, |Effect|? callback := null)

Animate one or more CSS properties on the element. If dur is specified, animate within the given duration of time. If given, invoke the callback function after the animation has completed.

elem.effect.animate(["opacity":"0.0"], 100ms) |fx| {
  fx.animate(["opacity":"1.0"], 100ms)
}
elemSource

native Elem elem()

Return the DOM element effects are applied to.

fadeInSource

native This fadeIn(Duration dur := 0ns, |Effect|? callback := null)

Fade in the element by animating its opacity. If dur is specificed, animate the fade within the given duration of time. If given, invoke the callback function after animation has completed.

fadeOutSource

native This fadeOut(Duration dur := 0ns, |Effect|? callback := null)

Fade in the element by animating its opacity. If dur is specificed, animate the fade within the given duration of time. If given, invoke the callback function after animation has completed.

fadeToSource

native This fadeTo(Decimal opacity, Duration dur := 0ns, |Effect|? callback := null)

Fade the opacity of the element to the target value, where 0.0 is fully transparent, and 1.0 is fully opaque. If dur is specificed, animate the fade within the given duration of time. If given, invoke the callback function after animation has completed.

hideSource

native This hide(Duration dur := 0ns, |Effect|? callback := null)

Hide the element. If dur is specificed, animate the display within the given duration of time. If given, invoke the callback function after animation has completed.

makeSource

new make(Elem elem)

Construct a new Effect object for the given DOM element.

showSource

native This show(Duration dur := 0ns, |Effect|? callback := null)

Show the element. If dur is specificed, animate the display within the given duration of time. If given, invoke the callback function after animation has completed.

slideDownSource

native This slideDown(Duration dur := 0ns, |Effect|? callback := null)

Make the element visible by animating its height. If dur is specificed, animate the slide within the given duration of time. If given, invoke the callback function after animation has completed.

slideUpSource

native This slideUp(Duration dur := 0ns, |Effect|? callback := null)

Hide the element by animating its height. If dur is specificed, animate the slide within the given duration of time. If given, invoke the callback function after animation has completed.