Wiki
Clone wikivirtual-bookshelf / API / FadeTransition
FadeTransition
FadeTransition is a utility class for fading in and out elements using its CSS opacity. It will only allow one element to be visible at a time, no matter how fast it is called.
new VirtualBookshelf.FadeTransition(container, outDuration, inDelay, inDuration)
container
Shown elements are added to this container when they're being faded in, and then removed when they're completely faded out.outDuration
How long it takes to fade out the previous item.inDelay
How long to wait before showing the next item.inDuration
How long it takes to fade in the next item.
fadeTransition.show(element)
Fades out the previous element, and then fades in this one.
fadeTransition.remove()
Remove any added elements from the DOM, and cancel timers.
Updated