I have a set of posts that I'm trying to fadeInUp one by one. They are in masonry in my actual example, so this would give the effect of them locking together. Like the posts here essentially: https://undsgn.com/uncode/blog/blog-full-width-masonry/
So for the example I've put together a JSFiddle: enter link description here
Which contains:
HTML:
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css">
<div class="fade-in-post-container">
<div class="elementor-post">Post</div>
<div class="elementor-post">Post</div>
<div class="elementor-post">Post</div>
</div>
CSS:
.elementor-post {
padding:20px 30px;
display:inline-block;
text-align:centre;
background:red;
}
jQuery:
jQuery('.fade-in-post-container .elementor-post').addClass('animated fadeInUp');
So, as you can probably see, I'm using the .css library Animate.css and I'm using jQuery to find an element and apply the requires .animate .effect classes to it.
This works great so far, but as you can see from the JSFiddle they all fade in at once, instead of one by one and interlocking...
I thought about utilising this somehow:
.each(function(i) {
jQuery(this).delay(250 * i)
Which would be OK if I could use jQuery animations perhaps? But I guess this might just apply the class to the elements one at a time, I tried it, and it doesn't work...
I've also tried creating the whole effect with jQuery fadeIn or Animations, but I'm finding it really difficult to find a workable solution...