WOW icon indicating copy to clipboard operation
WOW copied to clipboard

WOW elements flash on screen briefly before animation

Open fensterbaby opened this issue 9 years ago • 9 comments

My WOW elements flash on screen then immediately disappear and then animate in properly.

http://alaskawebcrafters.com/content-management-systems

jquery 1.11.3 Chrome Version 48.0.2564.48

Any ideas? Thanks!

Greg

fensterbaby avatar Jan 01 '16 07:01 fensterbaby

Try adding visibility:hidden style property for that element. Example:

<div class="wow fadeIn" data-wow-delay=".1s" style="visibility:hidden">
     content
</div>

This worked for me for fadeIn. I have not tried for other animations yet.

cosecantt avatar Mar 06 '16 10:03 cosecantt

Hi, the visibility didn't work for me, i used the css opacity : 0 in the wow class and used the callback on the end of the animation (https://github.com/matthieua/WOW/issues/230) to put opacity : 1. and worked.

carlos-kryzalis avatar Mar 09 '16 11:03 carlos-kryzalis

For me, using "visibility:hidden" did not work for fixing the animation flash on the page load, but using @carlos-kryzalis' solution did. The only issue now is that my animated element disappears (sets back to opacity: 0) once the animation is complete. Any ideas on how to fix that?

dandanidanielle avatar Mar 14 '16 22:03 dandanidanielle

What animation did not work? It worked for fadeIn at least for me as I posted the code above. Will you post the animation you have an issue? Also it is better to check animation.css file to figure out what animation it uses. In some cases an animation uses opacity property others visibility. Try both.

cosecantt avatar Mar 15 '16 03:03 cosecantt

thats the code that worked for me:

<style> .wow{ opacity: 0; } </style> <script> function afterReveal( el ) { el.addEventListener('animationend', function( event ) { $('.wow').each(function(){ $(this).css('opacity',1); }); }); } new WOW({ callback: afterReveal }).init() </script>

carlos-kryzalis avatar Mar 15 '16 14:03 carlos-kryzalis

Thanks for posting this!

dandanidanielle avatar Mar 15 '16 17:03 dandanidanielle

using .wow { visibility: hidden; } worked for me

MohammadDayeh avatar Mar 05 '17 02:03 MohammadDayeh

Improved upon solution provided by @carlos-kryzalis

<style> .wow{ opacity: 0; } </style>
<script> function afterReveal( el ) { el.addEventListener('animationstart', function( event ) { $('.wow').each(function(){ $(this).css('opacity',1); }); }); } new WOW({ callback: afterReveal }).init() </script>

dystopiandev avatar Mar 08 '18 11:03 dystopiandev

.wow { visibility: hidden; } solved all my problems of flashing before fadeins. just having some conscerns on whether google still registers the content. search console looks good so far...

any experience with this?

michael-feh avatar Oct 12 '20 11:10 michael-feh