divs are invisible/transparent | WordPress.org

After some investigation, I found that the JS code on line 108 of AnimOnScroll.js is never run: if( inViewport( el ) ) { ... } Looking at that function, it checks if the element is in view, and if so, it adds the .shown class to the div which turns the opacity to 1.

I noticed that it’s because the check for Modernizr.cssanimations returns undefined for some reason. I have no idea why, as this would be browser specific and I’m using Chrome v116 (I’m going to test updating to the latest CHrome, but I don’t think it’ll help)

I double checked and Modernizr is correctly loaded — Modernizr.csstransitions is true, so I’m really not sure what to make of this.

I figured it out, the theme I’m using also has Modernizr loaded, but with only http://modernizr.com/download/#-csstransforms3d-csstransitions-cssclasses-teststyles-testprop-testallprops-prefixes-domprefixes and cssanimations isn’t included so it overwrites the loaded instance of Modernizr from Simple Masonry Layout 🙁

Is there a good way to override modernizr in wordpress so only 1 combined modernizr is used.

Plugin Author
Tako

(@razzu)

Hello,

Either dequeue theme’s modenizr or load theme’s modenizr to only required page.

Hope this helps.. Thanks

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer