Repository - API - Source
reveal()
on the same target
breaking animation. #468package.json
– options.cleanup
is now correctly set to false
by default. #457
options.desktop
.sr
is added to <html>
during instantiation when supported. #294height: 100%
is added to <body>
during instantiation when supported. #298options.opacity
is set to null
.options.cleanup
toggles whether generated styles are removed upon reveal completion (when options.reset
is false
). #292clean()
method removes specific generated styles and event listeners. #227destroy()
method removes all generated styles and event listeners. #227debug
static property toggles error messages in console. #351reveal()
method no longer accepts an interval
parameter. Instead, sequence intervals are now defined with options.interval
.isSupported()
is now static.options.distance
supports only em
px
and %
values.matrix3d()
property, with the correct prefix and only when necessary. #292version
is now a read-only instance property.options.viewFactor
clamps values outside of 0.0
to 1.0
.requestAnimationFrame
polyfill now reliably throttles callback invocations.version
updated with correct library version.sync()
method now properly supports sequences.console.log
calls back to non-minified distribution. #235console.log
calls from distribution. #235reveal()
error message.config.reset
now works properly with sequences. #241isNode()
method added to Tools
.reveal()
.config.container
are now supported.reveal()
now accepts an interval
as it's last argument to create sequences. #86 #180 #187 #215 #234ScrollReveal:
for clarity.supported()
method to isSupported()
.supported()
. #220console.log
is now used instead of console.warn
. #215tools.isSupported
method to ScrollReveal.prototype.supported
.init()
method was removed.config.mobile
in reveal()
now works. #216reveal()
calls no longer prematurely initialize animation.config.wait
.reveal()
and sync()
now return the ScrollReveal instance even on failure. #198This version marks a significant change in how developers use ScrollReveal, introducing a JavaScript API to replace the inline attribute parser. It's a big shift, but prioritizes maintainability and flexibility over the novelty of natural language parsing.
reveal()
. #1 #122sync()
.config.afterReset
.config.enter
renamed config.origin
.config.wait
renamed config.delay
.config.delay
renamed config.useDelay
.config.over
renamed config.duration
.config.move
renamed config.distance
.config.viewport
renamed config.container
.config.vFactor
renamed config.viewFactor
.config.complete
renamed config.afterReveal
.string
).config.scale
expects value type number
(instead of object
).config.rotation
axis values require string
with unit type (instead of number
).1
. #185data-sr
attributes.bower.json
syntax. #150new
keyword) is now supported. #148vFactor
and alias vF
control when an element is considered visible.opacity
controls starting opacity.hustle
was removed.spin
controls yaw.roll
controls roll.flip
controls pitch.2.0.4
change to element animation logic. #1082.0.3
change to element visibility logic. #106data-sr
attributes are now stripped from initialized elements. #100 @orapouso.config.delay = "onload"
was addressed.setTimeout
, config.complete
and incorrect animation timing were addressed. #96scale
controls element starting size.config.complete
defines a callback for when reveals finish.config.viewport
defines custom viewports.config.mobile
enables/disables ScrollReveal on mobile devices.config.delay
controls when animations are delayed.data-sr
instead of data-scroll-reveal
.after
keyword was removed.data-scroll-reveal-id
attribute added to revealed DOM elements.data-scroll-reveal
attribute to parse animation instructions, in place of data-scrollReveal
.reset
keyword allows elements to reveal each time they enter the viewport.move
keyword can now be replaced with with CSS easing keywords (e.g. ease-in-out
).DOMContentLoaded
event.