Animate and wow css library

Asked

Viewed 79 times

1

Guys I have an img with 2 animations, but I want only one to be continuous, which apply the animation several times, so start the animation is applied fadein with 1.5s of delay and 3s in 3s applies the Pulse non-stop. In the parameters I know will apply in the two animations, but I want only Pulse to be infinite and the animation to occur every 3 seconds.

<img class="img-responsive logo wow fadeIn pulse" src="imagens/logo.png" data-wow-delay="">

1 answer

-1

For the Animate documentation on Github, you can try the following:

<img id="imagem1" class="img-responsive logo fadeIn pulse" src="imagens/logo.png"/>

<style>
    #imagem1{
      -vendor-animation-duration: 2s;
      -vendor-animation-delay: 3s;
      -vendor-animation-iteration-count: infinite;
    }
</style>

NOTE: replace "vendor" with the applicable prefix (Webkit, Moz, etc (for compatibility reasons, I suggest doing with all))

The fadein part, I would use jQuery to, after loading the document and running the fadein class is removed:

<script type="text/javascript">
    $(document).ready(function(){
         setTimeout(function(){
           $("#imagem1").removeClass("fadeIn");
         }, 2000);
    });
</script>

Test and see if it works, please.

============================EDIT 1==================================

It may be that Animate does not allow (or fails when trying) to run two animations simultaneously on the same element (I’m not sure, I’ve never tested and I have no way to test now rs), but it may solve this:

<img id="imagem1" class="img-responsive logo fadeIn" src="imagens/logo.png"/>

    <style>
        #imagem1{
          -vendor-animation-duration: 2s;
          -vendor-animation-delay: 3s;
          -vendor-animation-iteration-count: infinite;
        }
    </style>

<script type="text/javascript">
        $(document).ready(function(){
             setTimeout(function(){
               $("#imagem1").removeClass("fadeIn");
               $("#imagem1").addClass("pulse");
             }, 2000);
        });
    </script>
  • You gave your tip right, but only one animation is working, I put so <img id="logo-anime" class="img-responsive logo wow fadeIn pulse" src="imagens/logo.png" data-wow-delay="1.5s"> but only the first one works, the fadein a Ulse does not work even once, it seems that only the first animation that puts works, as I do for both work?

  • I don’t know why but it didn’t work, didn’t remove the class and added another one. But if I leave the element with no class and put in js for only addClass then it works and add the class, but take one and put another does not work, the image is repeating the class fadein

  • I solved by chance solving another problem, just you create a div and put in it the effect you want to do once and inside this div puts the object that you want to have the animation continues, then it will work out what I wanted to do, but now I’ve changed my mind and I don’t need more, but it is recorded here the solution for others who need.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.