You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: If you scroll up immediately after a reset triggers, there can be a bit of delay before the reveal triggers again, depending on your settings. When #273 is implemented, this delay could be removed by using the proposed beforeReset callback instead of afterReset.
window.sr=ScrollReveal();varminVFactor=0.0;varmaxVFactor=0.3;sr.reveal('.foo',{reset: true,viewFactor: maxVFactor,afterReveal: setMinVFactor,afterReset: setMaxVFactor});console.log("vFactor initialized as: "+maxVFactor);// ScrollReveal callbacks are passed// the dom element, so it’s easy to// pass this to our setVFactor() method// which re-reveals that element with// the new configuration.functionsetVFactor(el,vf){sr.reveal(el,{viewFactor: vf});}// And the callbacks themselves...functionsetMinVFactor(el){setVFactor(el,minVFactor);console.log("vFactor set to: "+minVFactor);}functionsetMaxVFactor(el){setVFactor(el,maxVFactor);console.log("vFactor set to: "+maxVFactor);}
Running ScrollRreveal 3.2.0 on Chrome 51 (Windows 10)
I would love some guidance on how I can have
viewFactor
at0.7
but only triggerreset
after the element is completely outside the viewport.Thanks!
The text was updated successfully, but these errors were encountered: