I use animation by scrolling through a website using animate.css and a JS script to check the viewport. Scripts work, it appears, but then disappears. I believe this is because classes are added to the element, but the original “hidden” class remains dominant after the animation is called.
Here is the code:
jQuery(document).ready(function() {
jQuery('.fourth-right').addClass("hidden").viewportChecker({
classToAdd: 'visible animated fadeInRight',
offset: 100
});
});
.hidden has opacity:0
and .visibleopacity:1
How to remove classe hidden
after calling animation using visible animated fadeInRight
? I tried with .removeClass, but I could not get it to work, you know why? I also tried installing opacity:1!important
on .visible.
dbsso source
share