Delete class after another jQuery was called

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:0and .visibleopacity:1

How to remove classe hiddenafter 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!importanton .visible.

+4
source share
1 answer

viewportChecker (: github)

classToRemove: 'hidden', // Class to remove before adding 'classToAdd' to the elements
0

Source: https://habr.com/ru/post/1613118/


All Articles