Seeking assistance in adding a slideUp effect to my set of posts/divs in Wordpress that currently fade in one by one using jQuery.
I want the posts to slide up and fade in simultaneously, similar to this example: where they animate on filter click.
I've tried different methods but can't seem to achieve the desired result. Here's the code I have:
HTML
<div class="fade-in-post-container">
<div class="elementor-post">test</div>
<div class="elementor-post">test</div>
<div class="elementor-post">test</div>
<div class="elementor-post">test</div>
<div class="elementor-post">test</div>
</div>
CSS
.elementor-post {float:left; margin-right:20px;}
.fade-in-post-container .elementor-post { display: none; }
jQuery
jQuery(".fade-in-post-container .elementor-post").each(function(i) {
jQuery(this).delay(500 * i).fadeIn(1000);
});
Check out the jsFiddle here: https://jsfiddle.net/shan_2000_uk/kugc7m61/16/
I attempted the following:
jQuery(".fade-in-post-container .elementor-post").each(function(i) {
jQuery(this).delay(250 * i).fadeIn(1000).slideUp(1000);
});
Unfortunately, it's not working as expected... Thank you for your help!