API/libsapojs/SAPO/Effects/Fade

[Elements] are optional

Class SAPO.Effects.Fade


class SAPO.Effects.Fade
Defined in Effects/Fade/0.1/lib.js

Constructor Summary
Fade()

Function Summary
fromTo (Object el, Object options)
Transitions a given element from one opacity value to another
hide (Object el, Object options)
Hides a given element with a fadeout effect
show (Object el, Object options)
Shows a given element with a fadein effect

Constructor Details

constructor Fade

Fade()

Function Details

function fromTo

fromTo(Object el, Object options)
Transitions a given element from one opacity value to another
Parameters:
el - target element
options - animation options
  • Number from - initial opacity value (between 0 and 1)
  • Number to - final opacity value (between 0 and 1)
  • Number dur - duration in milliseconds
  • Function after - Callback executed when the animation is finished

function hide

hide(Object el, Object options)
Hides a given element with a fadeout effect
Parameters:
el - target element
options - animation options
  • Number dur - duration in milliseconds
  • Function after - Callback executed when the animation is finished

function show

show(Object el, Object options)
Shows a given element with a fadein effect
Parameters:
el - target element
options - animation options
  • Number dur - duration in milliseconds
  • Function after - Callback executed when the animation is finished